emacs-devel
[Top][All Lists]
Advanced

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

Re: Scrolling commands and skipping redisplay


From: Alan Mackenzie
Subject: Re: Scrolling commands and skipping redisplay
Date: Sat, 11 Apr 2020 13:21:26 +0000

On Thu, Apr 09, 2020 at 03:32:13 +0300, Dmitry Gutov wrote:

[ .... ]

I think it would be useful to have a quick summary of six possibilities
for fast scrolling of a buffer caused by holding down C-v.

I observed these phenomena on a master branch build with CFLAGS=-Og -g3
before the recent optimisations for this.  I'm running on a Linux
virtual terminal, with 65 lines of text fitting in a window.

In all the tests I held down <page down> for a few seconds, then let it
go.  (<page down> is equivalent to C-v.)

Disclosure: I implemented fast-but-imprecise-scrolling.

(i) (eq jit-lock-defer-timer nil)
  a - f-b-i-s nil:
    One or two screenfuls get displayed; then Emacs appears to hang.
    On releasing <page down> Emacs does nothing and is unresponsive for
    a long time (up to 10 or 20 seconds).  It then displays the position
    it has reached.
  b - f-b-i-s t:
    Emacs continually displays a different screen, always fontified, but
    jerkily.  On releasing <page down>, one or two more screens are
    displayed, and Emacs becomes responsonsive again almost instantly.

(ii) (eq jit-lock-defer-timer 0)
  a - f-b-i-s nil:
    Screenfuls get continually displayed, all fontified, but jerkily.
    On releasing <page down>, the scrolling continues for a long time
    (10 or 20 seconds), and the last screen is displayed, before Emacs
    becomes responsive to user input.
  b - f-b-i-s t:
    Screenfuls get continually displayed, but more slowly that in (ii)a,
    and jerkily.  Screenfuls are partially fontified when they are first
    displayed, and the fontification gets completed an instant later,
    before scrolling further.  On releasing <page down>, Emacs becomes
    responsive again almost instantly.

(iii) (eq jit-lock-defer-time 0.1)
  a - f-b-i-s nil:
    Screenfuls are displayed steadily and rapidly, unfontified.  On
    releasing the key, the scrolling stops instantly, and there is a
    longish (0.1s) delay until the same screen gets redisplayed
    fontified.  Emacs becomes responsive instantly.
  b - f-b-i-s t:
    Indistinguishable from (iii)(a).

My personal view: As defaults, I think (i)a and (ii)a are bad, due
to the long intervals Emacs appears to have hung in.  Of (i)b and (ii)b,
I think (i)b is better, since it avoids the "twinkling" of (ii)b.

I dislike (iii)a,b because of the appearance of non-fontified screens,
but particularly because the last screen gets fontified in situ after
first appearing unfontified.  I think the non-fontification looks poor
to a user, even though the scrolling is smooth.

If it were up to me to chose a default setting, I would prefer (i)b,
closely followed by (ii)b.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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