emacs-devel
[Top][All Lists]
Advanced

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

Re: Slow redisplay with long lines


From: Eli Zaretskii
Subject: Re: Slow redisplay with long lines
Date: Fri, 16 May 2014 23:36:43 +0300

> From: Stephan Mueller <address@hidden>
> Date: Fri, 16 May 2014 18:08:18 +0000
> Cc: "address@hidden" <address@hidden>,
>       "address@hidden" <address@hidden>
> 
> From: Eli Zaretskii [mailto:address@hidden 
> " > From: Stephan Mueller <address@hidden>
> " > " > Long lines slow down redisplay because it needs to scan the entire
> " > " > line to see how tall it will be on display.
> " > "
> " > " Why should it care about the whole line rather than only the part
> " > " of it that's displayed?
> " > 
> " > So that the line height doesn't change when scrolling horizontally
> " > and a taller character comes into view?
> "
> " No, horizontal scrolling causes another redisplay, which examines the
> " characters that came into view at that time.
> 
> So, IIUC, that means that scrolling horizontally _can_ cause the user's
> experience to be that the height of a line was changed by looking at a
> different portion of it.

Yes, it can happen.  You can see this yourself like this:

 emacs -Q
 M-x font-lock-mode RET
 M-x load-library RET info RET
 C-u 122 M-x goto-char RET
 C-SPC C-e
 M-o O info-title-1 RET
 C-a
 C-x 3
 C-e

> Understood it is redisplayed (and so no doubt draws correctly), but
> I'd still consider the height change to be an odd behaviour.  I'm
> curious if it was an intentional choice (perhaps in the name of
> perf, removing one of the reasons to scan the whole line)?

It is the design principle of the Emacs display engine to examine as
little of buffer text as possible, because otherwise it would be
unbearably slow, even on a fast machine.



reply via email to

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