User forums > Using Code::Blocks

Slow scrolling? [Ubuntu]

<< < (11/22) > >>

dmoore:
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.

MortenMacFly:

--- Quote from: jens on July 23, 2012, 09:03:57 pm ---Could you please test the attached patch to Editor.cxx.

--- End quote ---
Ah - my favourite again: "Error: Chunk info expected.". :( Nevermind - these few lines I can do by hand... :P

dmoore:

--- Quote from: MortenMacFly on July 24, 2012, 06:20:28 am ---
--- Quote from: jens on July 23, 2012, 09:03:57 pm ---Could you please test the attached patch to Editor.cxx.

--- End quote ---
Ah - my favourite again: "Error: Chunk info expected.". :( Nevermind - these few lines I can do by hand... :P

--- End quote ---

The one liner I propose about would be instead of the one Jens supplied (a mere refinement of his fine work, of course).

Jenna:

--- Quote from: MortenMacFly on July 24, 2012, 06:20:28 am ---
--- Quote from: jens on July 23, 2012, 09:03:57 pm ---Could you please test the attached patch to Editor.cxx.

--- End quote ---
Ah - my favourite again: "Error: Chunk info expected.". :( Nevermind - these few lines I can do by hand... :P

--- End quote ---
I will test it with tortoise later the day.
It should wotk, but I removed the comment lines from git manually, maybe I removed too much (it was late yesterday).

Jenna:

--- Quote from: dmoore on July 24, 2012, 04:06:48 am ---So this is odd:


--- Code: ---void Editor::ScrollText(int /* linesToMove */) {
//Platform::DebugPrintf("Editor::ScrollText %d\n", linesToMove);
Redraw();
}

--- End code ---

So if they hadn't done this


--- Code: ---void ScintillaWX::ScrollText(int linesToMove) {
    int dy = vs.lineHeight * (linesToMove);
    sci->ScrollWindow(0, dy);
    sci->Update();
}

--- End code ---

(Editor is a base class of SctinillaWX)

Then there would be no lag.

--- End quote ---
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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version