https://bugs.kde.org/show_bug.cgi?id=465841

--- Comment #21 from Waqar Ahmed <waqar....@gmail.com> ---
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 466531

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

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to