all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: profiler-report seems to be missing data?
Date: Thu, 16 Aug 2018 18:47:01 -0400	[thread overview]
Message-ID: <jwvlg962ayh.fsf-monnier+gmane.emacs.help@gnu.org> (raw)
In-Reply-To: CAHV0hAiq1mgSYHbvjHCSpWeu0eMu12MKSvHC+k6RGVOs6hJ7QQ@mail.gmail.com

> 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




  parent reply	other threads:[~2018-08-16 22:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-15 15:00 profiler-report seems to be missing data? Charlie Andrews
2018-08-15 18:46 ` Eli Zaretskii
2018-08-16 13:47 ` Charlie Andrews
2018-08-16 14:19   ` Eli Zaretskii
2018-08-16 15:32     ` Michael Heerdegen
2018-08-16 17:12       ` Charlie Andrews
2018-08-16 17:28         ` Eli Zaretskii
2018-08-16 17:33           ` Charlie Andrews
2018-08-16 18:00             ` Eli Zaretskii
2018-08-16 18:48               ` Michael Heerdegen
2018-08-16 18:59                 ` Eli Zaretskii
2018-08-16 18:54         ` Michael Heerdegen
2018-08-16 22:47 ` Stefan Monnier [this message]
2018-08-17 15:36   ` Charlie Andrews
2018-08-19  5:06     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvlg962ayh.fsf-monnier+gmane.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.