unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Latency profiling?
@ 2018-03-18 20:29 Sebastian Sturm
  2018-03-18 20:46 ` Eli Zaretskii
  2018-03-19  1:25 ` Stefan Monnier
  0 siblings, 2 replies; 5+ messages in thread
From: Sebastian Sturm @ 2018-03-18 20:29 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-24 17:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-18 20:29 Latency profiling? Sebastian Sturm
2018-03-18 20:46 ` Eli Zaretskii
2018-03-19  1:25 ` Stefan Monnier
2018-03-19  2:01   ` Joseph Garvin
2018-03-24 17:23     ` Sebastian Sturm

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).