| Summary: | Very slow VHDL syntax highlighting | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-syntax-highlighting | Reporter: | Gernot Gebhard <gg> |
| Component: | syntax | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | christoph |
| Priority: | NOR | ||
| Version First Reported In: | 5.66.0 | ||
| Target Milestone: | --- | ||
| Platform: | Manjaro | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/syntax-highlighting/764957b1d23c48a160f0faca623843f678eb2a52 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: | Flamegraph for highlighting /lib/gaisler/leon3v3/iu3.vhd | ||
|
Description
Gernot Gebhard
2020-03-12 12:07:08 UTC
I think the issue is that most regex here are marked "dynamic=true" and for these kind of regex stuff we neither pre-compile nor cache the match indices... Merged https://phabricator.kde.org/D28015 but still slow ;=) Next try: https://phabricator.kde.org/D28039 Now highlighted in under one second ;=) Git commit 764957b1d23c48a160f0faca623843f678eb2a52 by Christoph Cullmann. Committed on 14/03/2020 at 14:28. Pushed by cullmann into branch 'master'. optimize dynamic regex matching Summary: allow such matches to be cached, too, by guarding the cache with the last used captures makes VHDL highlighting instantanious for bug 418778 Test Plan: make && make test example from bug 418778 is fast! Reviewers: dhaumann, vkrause, nibags Reviewed By: dhaumann Subscribers: mwolff, kwrite-devel, kde-frameworks-devel Tags: #kate, #frameworks Differential Revision: https://phabricator.kde.org/D28039 M +13 -1 src/lib/abstracthighlighter.cpp M +2 -3 src/lib/rule.cpp M +9 -3 src/lib/rule_p.h https://commits.kde.org/syntax-highlighting/764957b1d23c48a160f0faca623843f678eb2a52 |