[Top][All Lists]

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

Re: line buffer as Red Black Trees instead of linear

From: Eli Zaretskii
Subject: Re: line buffer as Red Black Trees instead of linear
Date: Thu, 15 May 2014 23:06:54 +0300

> Date: Thu, 15 May 2014 22:47:27 +0300
> From: Alin Soare <address@hidden>
> > > The major improvement would be the redisplay.
> >
> > Actually, no.  Redisplay scans the buffer linearly, so it would
> > be unaffected.
> >
> >
> I did not check recently which operations are called by redisplay, in order
> to see exactly where redisplay and other operations get stuck. But emacs
> works terrible with long lines.
> Emacs works bad with buffers with long lines. This would work well, and all
> the others atomic operations, like random access, search, will preserve the
> current speed.

You cannot help redisplay with long lines by giving it random access
to buffer text.

Long lines slow down redisplay because it needs to scan the entire
line to see how tall it will be on display.  For that, you must scan
the line in its entirety, since Emacs supports variable-size fonts and
images on the same line, so determining the height of a line requires
to find the largest display element (character glyph or image)
displayed on that line.

How can random access to buffer text help here?

reply via email to

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