User forums > Using Code::Blocks
Slow scrolling? [Ubuntu]
Jenna:
--- Quote from: dmoore on July 24, 2012, 05:28:04 am ---We can probably also drop the crap related to ticket #9057. (Although it doesn't seem to do any harm either)
BTW, comparing scite with C::B without the sci->update call:
* by default, scite scrolls 4 lines per wheel motion vs 3 lines in C:::B.
* a full mousewheel motion (moving as much as possible in one motion) in scite scrolls about 70 lines vs 35 lines in C::B.
I personally prefer C::B's current behavior, but it would be good to add the customization to the lines per motion. But perhaps scite also allows for some acceleration of the step size upon repeated moves? That might be nice to have.
--- End quote ---
At least the amount of scrolled lines can be made configurable (as posted before), because wxWidgets uses three lines in any cases (until) they find a way to find the systems preferred scroll amount.
It might also be possible to accelerate the scrolling, if more scroll events come in in short time, but this needs a threshhold to determin what is short and a threshhold for the maximal acceleration.
dmoore:
--- Quote from: jens on July 24, 2012, 06:47:28 am ---I thought about doing this way, but I decided to patch scintilla's sources (again), because the (admittedly small) overhead for is not needed at all.
I did not do any exact measuring which of the two ways is shorter.
But the original ScrollTo took about 35 ~ 50 ms per line and the "new" one takes 0 ~ 1 ms, so it does not really matter if it is takes another 0.5 ms or not I think.
--- End quote ---
On my netbook I thought there was a slight performance improvement to doing the patch the way I proposed (just removing the sci->Update call). I could be imagining things, but it did seem to help to have the partial scroll instead of full redraw.
Jenna:
I did a short mesurement with wx2.9, because the stopwatch there has µs.
The avaregd time call to ScrollTo differs for about 25 µs, so it is probably better to change ScintillWX instead of scintilla's sources (again).
MortenMacFly:
--- Quote from: jens on July 24, 2012, 07:46:58 am ---so it is probably better to change ScintillWX instead of scintilla's sources (again).
--- End quote ---
...meaning your patch is obsolete and superseeded by the ones of dmoore? I wonder if it has side-effects on Windows...
Jenna:
--- Quote from: MortenMacFly on July 24, 2012, 08:50:17 am ---
--- Quote from: jens on July 24, 2012, 07:46:58 am ---so it is probably better to change ScintillWX instead of scintilla's sources (again).
--- End quote ---
...meaning your patch is obsolete and superseeded by the ones of dmoore? I wonder if it has side-effects on Windows...
--- End quote ---
It's basically the same, it avoids the call of wxWindows::Update() on every scrol, which immediately updates the whole invalidated area.
But the original scintilla Redraw() invalidates the whole client area and the other one (most likely) only the scrolled part.
But in both cases real repainting is done later.
I will test it on windows.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version