| Summary: | Kate stops responding after pasting a very long line | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | Christopher Yeleighton <giecrilj> |
| Component: | folding | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | waqar.17a |
| Priority: | NOR | ||
| Version First Reported In: | 22.12.2 | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Christopher Yeleighton
2023-02-27 15:02:37 UTC
> 2. Let Kate refuse to paste a line that is too long for it to handle! That's not going to happen simply because can't know what's too long to handle. For me even very long lines work fine, for someone else the same stuff might not as everyone runs different kind of hardware. That said, maybe we can profile and fix the issue if possible. However, it may not be possible as Kate in general doesn't behave well with very long lines. We have had many reports around this, probably this bug itself is a dupe of some other. Anyways, can you try to attach to Kate from the Hotspot[1] app. Hotspot is available in most distros. - Attach to kate from hotspot - start recording - Paste long line / make kate slow - wait 4 or 5 seconds - stop recording - share the perf output / screenshots of the flamegraph [1]: https://github.com/KDAB/hotspot Can you share the following information? - What are your indenter settings? - Have you enabled Indent on Paste? - What is your "Default Indenter"? - What was the filetype of document that you pasted the text into? - Can the line of text which makes kate slow be shared? A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/493 Git commit 294543a2977c4181bb0842c2a45f573f8335fd03 by Christoph Cullmann, on behalf of Waqar Ahmed. Committed on 03/03/2023 at 19:42. Pushed by cullmann into branch 'master'. Improve cstyle performance With this patch I can notice 7x-8x improvement in performance. The main culprit was `tryMultiLineStringLiteral` which searched the whole document for a multiline literal beginning. I have now limited it to 25 lines max. Besides, the multiline string matching is useless for every other language besides C++ so return early if the mode is no C++ Related: bug 465841 M +1 -0 autotests/input/indent/cstyle/indentpaste5/expected M +1 -0 autotests/input/indent/cstyle/indentpaste5/origin M +1 -0 autotests/input/indent/cstyle/string2/expected M +1 -0 autotests/input/indent/cstyle/string2/origin M +9 -0 src/script/data/indentation/cstyle.js https://invent.kde.org/frameworks/ktexteditor/commit/294543a2977c4181bb0842c2a45f573f8335fd03 Git commit 67e566875597f0c1b1c0e0fafc482efcf4512b88 by Waqar Ahmed. Committed on 04/03/2023 at 08:55. Pushed by waqar into branch 'kf5'. Improve cstyle performance With this patch I can notice 7x-8x improvement in performance. The main culprit was `tryMultiLineStringLiteral` which searched the whole document for a multiline literal beginning. I have now limited it to 25 lines max. Besides, the multiline string matching is useless for every other language besides C++ so return early if the mode is no C++ Related: bug 465841 M +1 -0 autotests/input/indent/cstyle/indentpaste5/expected M +1 -0 autotests/input/indent/cstyle/indentpaste5/origin M +1 -0 autotests/input/indent/cstyle/string2/expected M +1 -0 autotests/input/indent/cstyle/string2/origin M +9 -0 src/script/data/indentation/cstyle.js https://invent.kde.org/frameworks/ktexteditor/commit/67e566875597f0c1b1c0e0fafc482efcf4512b88 Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |