On Feb 11, 2006, at 7:53 PM, Neil Hodgson wrote:

Jason Haslam:

I should probably mention that I am not using one of the tried and
true platforms.  I've been trying to implement the platform
compatibility layer in Qt 4.  My development platforms are Mac OS X
and windows.  I'm getting on pretty well.

   Well that makes it easy to compare against native Scintilla using
SciTE on Windows and Komodo on Mac OS X.


Interesting. It looks like Komodo uses Qt as well. That will provide a very good basis for comparison on all of the platforms that it supports.

I have done some fairly extensive profiling because of redraw
performance concerns.  After streamlining the font metrics routines
in my platform code I find that an obscene majority (north of 95
percent) of time is spent just rendering text.  This, I suppose,
shouldn't come as any great surprise.  That is why I have turned my
attention to trying to avoid any unnecessary repainting.

   Something to watch for is extra layers of buffering. Scintilla's
default is to buffer drawing each line into a bitmap that is then
copied to the 'screen'. On Qt the screen may be another full window
backing store. On MacOS X this may in turn be handed off to Quartz to
be composited onto the screen. All these layers can slow things down
so one thing to do is turn off Scintilla's buffering. It'd be
interesting to see what difference Quartz 2D Extreme makes to your
code and Komodo if turned on.


Qt 4 double-buffers all of its widgets by default. I've been running with scintilla's buffering off. I just tried Quartz 2D Extreme and it doesn't seem to have any effect in either app. I wonder if my graphics card is supported.

Like I said
before, performance is pretty good with just one widget, but initial
tests with two scrolled together show some jumpiness.

   In the past, there was an unpleasant visual shear between the
margin and text due to one being fully scrolled before the other. Its
not so much a matter of being slow as looking bad. The same may be the
case for your two synchronized panes. You could attempt to add an
incremental scroll method.
    Application: I want to scroll n (10) lines down.
    Scintilla1: OK, there's 32 lines to draw.
    Scintilla2: Like he said, we're synchronized.
    Application:
        For line in 0..31:
            Scintilla1.Scroll line+n up: n
                 If line on screen then copy else redraw
            Scintilla2.Scroll line+n up: n
    Application: Finished incremental scroll of n.
Application should not change anything while performing incremental scroll.

You're probably correct. A big part of the jumpiness that I'm seeing is likely just one pane drawing before the other. I want make sure that neither gets redrawn before the other is scrolled. Thanks for the tip.

Jason


_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to