This revision was automatically updated to reflect the committed changes.
Closed by commit R216:764957b1d23c: optimize dynamic regex matching (authored
by cullmann).
REPOSITORY
R216 Syntax Highlighting
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D28039?vs=77593=77613
REVISION
cullmann added a comment.
First let's have this, the current state is bad ;=)
INLINE COMMENTS
> dhaumann wrote in rule_p.h:126
> I dislike this protected hack :-)
That is called inheritance ;=)
I first had a virtual function, but this is much easier and faster. (and just
costs a few bytes)
dhaumann added a comment.
Thanks yes, maybe you can add a comment to the skipOffset, Christoph :)
REPOSITORY
R216 Syntax Highlighting
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D28039
To: cullmann, dhaumann, vkrause, nibags
Cc: mwolff, kwrite-devel,
mwolff added a comment.
Let me try to explain the skip offset idea (it's been years since I came up
with this in GeSHi :) )
A code highlighter will repeatedly ask all highlight contexts and items
therein to find the closest token to highlight next to the current cursor
position.
The
dhaumann accepted this revision.
dhaumann added a comment.
This revision is now accepted and ready to land.
I guess this is OK, but the concept of a "skip offset" is a bit fuzzy to me.
INLINE COMMENTS
> rule_p.h:126
> +
> +protected:
> +bool m_dynamic = false;
I dislike this protected
cullmann added a comment.
For the example from the bug this makes the difference between ~30 seconds on
a 4 Ghz machine to << 1 second ;=)
REPOSITORY
R216 Syntax Highlighting
REVISION DETAIL
https://phabricator.kde.org/D28039
To: cullmann, dhaumann, vkrause, nibags
Cc: kwrite-devel,
cullmann created this revision.
cullmann added reviewers: dhaumann, vkrause, nibags.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
cullmann requested review of this revision.
REVISION SUMMARY
allow such matches to be cached, too, by