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.
> 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.
> 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.
> Hmm... I tried to do this just now but I couldn't get scroll focus
> with any part of the window obscured.
Open SciTE, select Options | Always on Top and position over your
test window.
Neil
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest