[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: Fri, 16 May 2014 08:41:48 +0300

> Date: Fri, 16 May 2014 02:40:00 +0300
> From: Alin Soare <address@hidden>
> Cc: Stefan Monnier <address@hidden>, address@hidden
> > > 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.
> >
> This is right. Redisplay is one, and computing the result of some functions
> is another thing.
> I did not check the flow of the calls that take place in that situation,
> but I am sure that it happens at the level of buffer access, Some atomic
> procedures of access to buffer are linear in time, instead of constant or
> logarithmic in the worse case.

Not in redisplay.  It always moves to the next character, and
remembers the last place it was at, so it mostly only needs to advance
to the next character.

reply via email to

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