|
From: | grischka |
Subject: | Re: redisplay system of emacs |
Date: | Tue, 16 Feb 2010 20:20:06 +0100 |
User-agent: | Thunderbird 2.0.0.23 (Windows/20090812) |
Redisplay_internal does lots and lots of computations to detect which part of the buffer should be redisplayed at a given moment. All these computations can be avoided using a system of subwindows (1 for every char).Those computations are complicated because the buffer contents (or window width, or scroll amount, or...) might have changed, not just because the window might have been damaged in some complicated fashion.
It's not _that_complicated. Basically it just draws the new screen to memory, then compares it with the current screen and then updates the differences. And actually it works nicely and fast, just maybe slightly over-designed in cases. (For example changing "bazfoobar" to "baz,foobar" would output ",f" and "obar" and thus reuse the originally second "o" for the new first one. One might think that drawing one additional "o" could be faster than two XDrawString, but so what). Whether the code could be written to be easier to understand is a different question but who has time for cleanups anyway. --- grischka
[Prev in Thread] | Current Thread | [Next in Thread] |