help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: profiler-report seems to be missing data?


From: Stefan Monnier
Subject: Re: profiler-report seems to be missing data?
Date: Thu, 16 Aug 2018 18:47:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> I'm trying to profile the usually excellent `find-things-fast` package to
> figure out why it's slow in my project.

The presence of `let*` in the profile indicates that the code is not
byte-compiled.  The difference in performance when byte-compiled can be
large enough, so I'd suggest you first byte-compile your code and only
then would I recommend you profile it (if still needed).

>                 - #<lambda 0x5458e8e0>                               1024 51%
>                  - let*                                              1008 50%
>                     cons                                               24  1%

This suggests that a lot of time is spent in `let*` which may simply be
because #<lambda 0x5458e8e0> is called many many times and doesn't do
much more than `let*`.

Looking at your function, I'm indeed surprised that even tough this
`let*` was found 1008 times none of those times also found
file-name-nondirectory or expand-file-name or gethash in the stack.

Maybe this hints at a bug in the profiler code.  Can you try and run
this code many more times, so as to increase the "1008" to a larger
number, making it yet more statistically unlikely that none of
file-name-nondirectory or expand-file-name or gethash are found?


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]