User forums > Using Code::Blocks
Slow scrolling? [Ubuntu]
Jenna:
--- Quote from: dmoore on September 05, 2012, 05:17:13 pm ---
--- Quote from: jens on September 05, 2012, 04:57:47 pm ---What makes me wonder, is that IncrementalSearch still works, but HighlightOccurrences does not.
And the ClearRange code is the same in both cases.
--- End quote ---
because (painstate==notpainting) == true for incremental search. IMHO it's a scintilla bug.
--- End quote ---
Why does it work in wxSTC then ?
It also uses scintilla internally and the chnage that discovered the issue is in ScintillaWx.cpp:DoPaint() .
Before the change Refresh was called from there (or more exactly from FullPaint()) .
dmoore:
--- Quote from: jens on September 05, 2012, 07:25:10 pm ---Why does it work in wxSTC then ?
--- End quote ---
Do you have a link to the code you tested? (I suspect there must be a full refresh/update being called somewhere or for whatever reason the editor is in a notPainting state)
--- Quote ---It also uses scintilla internally and the chnage that discovered the issue is in ScintillaWx.cpp:DoPaint() .
Before the change Refresh was called from there (or more exactly from FullPaint()) .
--- End quote ---
Yes, I see that here. (search the page for "refresh", it's the second instance.)
But I think that change is the right thing to do because they are trying to minimize on the amount of screen they repaint to be more efficient on things like VMs. But now they can no longer assume that a paint in progress will result in a full redraw, such as in that NotifyModified code.
EDIT: Less sure about this, because the DoPaint stuff is a wx-specific change. I guess the question is whether there is equivalent code for the non-wx implementations.
Jenna:
Another strange thing:
if I do the exact same call to ClearRange from inside IncSearch (for the Indicator used in HighlightOccurences), it clears the indicators.
dmoore:
--- Quote from: jens on September 05, 2012, 08:27:05 pm ---Another strange thing:
if I do the exact same call to ClearRange from inside IncSearch (for the Indicator used in HighlightOccurences), it clears the indicators.
--- End quote ---
Is that call from inside a handler to wxEVT_SCI_UPDATEUI ? I think that is why paintState != notPainting in the cbEditor code.
Jenna:
--- Quote from: dmoore on September 05, 2012, 09:04:45 pm ---
--- Quote from: jens on September 05, 2012, 08:27:05 pm ---Another strange thing:
if I do the exact same call to ClearRange from inside IncSearch (for the Indicator used in HighlightOccurences), it clears the indicators.
--- End quote ---
Is that call from inside a handler to wxEVT_SCI_UPDATEUI ? I think that is why paintState != notPainting in the cbEditor code.
--- End quote ---
No, it's from inide a key-event handler.
And what's more:
after using the wxScintilla UI-Event in the stc-sample to call HighlightOccurrences instead the wxUpdatUI event, the issue is there also.
That means you are right and it is most likely a scintilla and not a wxScintilla issue (bug?).
I did a simple measuring with a wxStopwatch and mikroseconds ( not very exact I know, but hopefully enough to see a possible difference).
There is no significant difference between scrolling with the cursor through a source-file with a call to Refresh() and without it.
In all cases each step takes between 60 and 120 µs (average a little less than 100 µs).
So the Refresh workaround should do it.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version