unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Fabrice Popineau <fabrice.popineau@gmail.com>
Cc: acm@muc.de, emacs-devel@gnu.org
Subject: Re: Is Emacs buffer scroll/redisplay slow?
Date: Sun, 19 Jan 2020 18:02:43 +0200	[thread overview]
Message-ID: <83y2u3xwm4.fsf@gnu.org> (raw)
In-Reply-To: <CAFgFV9NiKzH=c-ZY-7HfaAE7poRkMFd6SxeNEiQJAY5OoA00bg@mail.gmail.com> (message from Fabrice Popineau on Sun, 19 Jan 2020 16:34:17 +0100)

> From: Fabrice Popineau <fabrice.popineau@gmail.com>
> Date: Sun, 19 Jan 2020 16:34:17 +0100
> Cc: acm@muc.de, Emacs developers <emacs-devel@gnu.org>
> 
> C-n or down arrow

In that case, the elapsed time depends on the auto-repeat rate of your
keyboard, not just on the Emacs processing time, right?

>  Also, did you measure the CPU time it took, out of those 35 sec?  (I
>  assume the time you measured was elapsed time, yes?)
> 
>  >  > .... and it took 45s on Windows/WSL and 35s on Windows/native.
>  > 
>  >  That is slow indeed.
>  > 
>  > Definitely.
> 
>  Not necessarily.  The elapsed time has little to do with the speed we
>  scroll.
> 
> We could expect emacs to be a little bit more reactive here.

Please repeat the experiment in a fresh "emacs -Q" right after
starting it, then, after you finish scrolling, see what is the amount
of CPU time reported by utilities such as PsList.  Alternatively, look
at the load average value displayed by another Emacs session.

In my testing, when I lean on the DOWN arrow, the system load never
raises above 0.25, which means 3/4th of the time Emacs is idle.  My
keyboard's auto-repeat rate is 30 characters per second, which means
Emacs uses up about 7 msec (1000 / 30 / 4) to process every DOWN-arrow
keypress, and that includes all the redisplay code, JIT font-lock
etc.  I'm not sure I agree to call this "slow".



  reply	other threads:[~2020-01-19 16:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-19  9:34 Is Emacs buffer scroll/redisplay slow? Fabrice Popineau
2020-01-19 11:51 ` Alan Mackenzie
2020-01-19 14:24   ` Fabrice Popineau
2020-01-19 15:28     ` Eli Zaretskii
2020-01-19 15:34       ` Fabrice Popineau
2020-01-19 16:02         ` Eli Zaretskii [this message]
2020-01-19 17:15           ` Fabrice Popineau
2020-01-19 22:20     ` Stefan Monnier
2020-01-20  0:23       ` Fabrice Popineau
2020-01-20 13:20         ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83y2u3xwm4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=fabrice.popineau@gmail.com \
    /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 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).