[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: Alin Soare
Subject: Re: line buffer as Red Black Trees instead of linear
Date: Thu, 15 May 2014 22:47:27 +0300

> 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.

Try this: 

(dotimes (j 10000)
  (dotimes (i 10000)
    (insert 1000) ) )

This will insert a random unicode character many times in each line, and many lines.

Try to do these operations a few times: end-of-buffer (M->) and beginning of buffer (M-<).

These are problems that arise with long lines, in which redisplay gets stuck. I did not check recently the atomic operations on buffer data structure, where emacs gets stuck, but I am sure that redisplay gets stuck in buffer data structure.

For me the rediaplay works bad when a program outputs long lines in *shell*  -- probably because it modify the gap many times, and redisplay gets stuck. Konsole of KDE for example, works perfectly with any kind of outputs from any process.

reply via email to

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