-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance / responsiveness to inputs #32
Comments
The search suffers from massive performance problems. In other applications, even in large files (1 MB+), something as small as 1 character search results return instantly. Conclusion: there must be a better way to implement a search that is considerably more performant. It must be diagnosed whether the problem is the actual search itself or the visual highlighting of the search results. |
The startSegment/endSegment was not correctly calculated. Due to logic errors in the conditionals, startSegment was always 0, which caused the entire document structure to be refreshed on every deletion, including simple backspacing.
The cause of the search performance issues is indeed the It doesn't really make sense to me why the rehighlighting takes so long. We're applying quite a lot of formats, yes, but none of the search term highlighting formats modify the text layout in any way. Thus, this should not trigger a relayout, which is the only potential cause I can see for such a performance impact. An alternative solution might be to move the search term highlighting code to Unfortunately, simply making the |
The new highlighter no longer inherits from QSyntaxHighlighter and therefore no longer changes the QTextDocument's internal formats when search matches are set or reset. Instead it is embedded directly in the painting process of FormattableTextArea::updatePaintNode(), which means that corresponding rectangle highlighting nodes are only added if they are actually on-screen, which results in an enormous performance boost, especially for search inputs with a lot of matches.
All performance issues related to the search (see above) are now resolved. |
This issue is a catch-all issue to diagnose and fix all and any problems related to the performance and/or the general input responsiveness in Skywriter.
The text was updated successfully, but these errors were encountered: