Many enabled highlighters make scrolling and cursor moving very slow and laggy
OS: Windows 10 LTSC 2021 (version 21H2) x64 Klogg: 22.06.0.1289 Qt5
Here's the example of scrolling - I'm turning mouse wheel constantly but view is srolling as if I'm doing it once in a second.
Same with cursor moving, selection and Page Up / Page Down - when I'm pressing the key, klogg reacts only after 0,5-1 second.
It seems that the problem depends on log frame height, i.e. search results are being scrolled pretty fast 'cause their frame is usually short
The same version works OK on MacOS, so the problem is OS-related.
Kind of workaround - reduce the amount of lines in frame by:
- Increasing font size;
- Expanding the search results frame. Unfortunately this is almost not an option 'cause frame height is returning to default on every file opening (someone even had an issue about it, can't find now :( )
That looks very strange. Could you check if by any chance debug logs are enabled in settings? Also is it the same when using light theme?
@variar , suddenly I realized that my highlighter sets are the reason - I have many of them:
sets\size=21
sets\1\HighlighterSet\highlighters\size=4
sets\2\HighlighterSet\highlighters\size=2
sets\3\HighlighterSet\highlighters\size=30
sets\4\HighlighterSet\highlighters\size=24
sets\5\HighlighterSet\highlighters\size=14
sets\6\HighlighterSet\highlighters\size=3
sets\7\HighlighterSet\highlighters\size=6
sets\8\HighlighterSet\highlighters\size=5
sets\9\HighlighterSet\highlighters\size=16
sets\10\HighlighterSet\highlighters\size=25
sets\11\HighlighterSet\highlighters\size=9
sets\12\HighlighterSet\highlighters\size=7
sets\13\HighlighterSet\highlighters\size=5
sets\14\HighlighterSet\highlighters\size=2
sets\15\HighlighterSet\highlighters\size=12
sets\16\HighlighterSet\highlighters\size=3
sets\17\HighlighterSet\highlighters\size=13
sets\18\HighlighterSet\highlighters\size=8
sets\19\HighlighterSet\highlighters\size=4
sets\20\HighlighterSet\highlighters\size=1
sets\21\HighlighterSet\highlighters\size=4
and most of them have been enabled. Disabling some sets is solving the problem.
As for MacOS version - I guess it's just working faster :)
Thanks! That explains why scrolling gets slower with more visible lines. One more reason to switch highlighters to hyperscan. It allows to check a string against a set of regex in one go.
I've added hyperscan support for highlighters. It works as a pre-filter to skip highlighters that definetely can't match a line (hyperscan support for reporting exact match position is limited). All highlighters that do pass this pre-filter step are checked as normal to get exact matches. This should improve things when most highlighters don't match. Integrated into 24.11.0.1662.
I've accidentaly disabled hyperscan in all builds. Fixed in 24.11.0.1681. Now pre-filtering using hyperscan quick matching should be fast again.