| Summary: | kate stuck when opening huge single line file | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | Germano Massullo (Thetra) <germano.massullo> |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED INTENTIONAL | ||
| Severity: | normal | CC: | jonathan.poelen, tustamido |
| Priority: | NOR | ||
| Version First Reported In: | 22.08.1 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | gdb trace | ||
|
Description
Germano Massullo (Thetra)
2022-10-17 09:59:35 UTC
Developer's note: This is related to the way QRegularExpression works in Qt5: the text is copied for each call to match(QStringView) in syntax-highlighting: https://codebrowser.dev/qt5/qtbase/src/corelib/text/qregularexpression.h.html#_ZNK18QRegularExpression5matchE11QStringViewiNS_9MatchTypeE6QFlagsINS_11MatchOptionEE Qt6 does not have this defect. With kate-syntax-highlighter --output-format=ansi256colors and a json of 1.9M, it takes 45s with Qt5, but less than 1 second with Qt6. QString::fromRawData()'s document explains how to avoid copies with QRegularExpression, but there is a bug in Qt5 which will not be fixed: https://bugreports.qt.io/browse/QTBUG-108302 |