Neil Hodgson wrote:
Robert:


Well, other than the fact that a lot of what I have been doing in
Scintilla the past few weeks has been to avoid doing [horrendously
expensive] full Redraw() calls? ;)


These are all duplicate full Redraw() calls, which should not
change the invalid region. I modified Redraw() to perform its
operations 100 times rather than once and this cost less than a
millisecond. The cost of an extra Redraw() is about 0.000007 seconds
on a fairly old machine. The cost of the paint caused by a Redraw() is
around 0.06 to 0.12 seconds, depending on how much text is in the
window. If you call Redraw() a hundred times you still get the single
0.06 to 0.12 second paint.


While I definitely share your feelings about the widespread code
changes, isn't this (avoiding gratuitous Redraws) what some of your
code is already about - look at SetScrollBars() itself.  It *could*
have just blindly done an extra Redraw (or two)...


   If you don't have to repaint the whole window then you should avoid
it, but this is trying to optimize the case where you are already
committed to a full redraw.

I am not unfamiliar with the functioning of a "accumulate a damaged or invalid region or regions and periodically send paint messages with a clipping region set to match said damaged or invalid region(s)" windowing system... :)


For some reason when I was doing my traces into where the time was going for my "pathological" thousand-step Undo, I got the idea that Scintilla ending up not taking advantage of this aspect of Windows graphics (possibly because of the platform-independent graphics model)... if this is NOT the case, and Scintilla can typically benefit from this feature of windowing systems wherever it finds itself running, then there is [obviously] no discussion.

So I will stop pursuing this... almost. :)

OTOH, my patch for "lazy" Undo/Redo creates *dramatic* performance increases... and it seems that largely what it is doing is avoiding Redraw and SetScrollBars (which itself calls Redraw) calls. Hmmm. I wonder if the Redraws I was seeing were "bad" because there was just enough time between them to miss the "accumulate damage for a while" window?

Like I said previously, I am very glad that the "lazy" patch went in, and if the rest of the code can keep looking like its old self, that's a bonus! :)

Robert Roessler
[EMAIL PROTECTED]
http://www.rftp.com
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to