From: Sebastian Sturm <s.sturm@arkona-technologies.de>
To: emacs-devel@gnu.org
Subject: Latency profiling?
Date: Sun, 18 Mar 2018 21:29:54 +0100 [thread overview]
Message-ID: <3b1b3837-dcb6-66c5-3387-43dba8df77c4@arkona-technologies.de> (raw)
Hi,
when trying to pinpoint latency issues with my Emacs setup, my usual
modus operandi is to start the profiler, wildly pound on the keyboard
and look for suspicious hotspots in the resulting profile. This is
usually good enough to resolve the most annoying performance issues, but
the process is not as systematic as I'd like it to be and it is
difficult to quantitatively evaluate code improvements or check for
performance regressions across package updates.
I tried to profile elisp functions that involve a large number of
editing or motion commands, but it seems to me that Emacs is smart
enough to detect it's being used noninteractively (is that true?) and
omits calls to many expensive eye candy functions (such as the
lsp-ui/cquery sideline that displays type information on the C++ symbol
at point).
What is the best way to emulate interactive user input and reliably
assess the speed with which said input is processed?
Also, is there a way to profile not throughput, but latency (i.e. time
elapsed between key press and Emacs being ready for further input)? As
far as I can see, there are hooks invoked on self-insert-command, but I
didn't find a hook that fires when redisplay is done. Anything that uses
external tracing frameworks would also be fine in my book, as long as it
runs on Linux.
best,
Sebastian Sturm
next reply other threads:[~2018-03-18 20:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-18 20:29 Sebastian Sturm [this message]
2018-03-18 20:46 ` Latency profiling? Eli Zaretskii
2018-03-19 1:25 ` Stefan Monnier
2018-03-19 2:01 ` Joseph Garvin
2018-03-24 17:23 ` Sebastian Sturm
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=3b1b3837-dcb6-66c5-3387-43dba8df77c4@arkona-technologies.de \
--to=s.sturm@arkona-technologies.de \
--cc=emacs-devel@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.