D11487: optimization of TextLineData::attribute
Jaime Torres Amate
noreply at phabricator.kde.org
Thu Mar 22 16:34:06 UTC 2018
jtamate added a comment.
In D11487#231522 <https://phabricator.kde.org/D11487#231522>, @mwolff wrote:
> @jtamate looking at your screenshots, it represents closely what I see locally. Most notably, there are no red underlines in your screenshots which could arise due to spell checking. Thus I really wonder why you are seeing such a big hotspot there.
>
> Try perf, or try a poor mans profiler like GDB and regularly interrupt. Do you really end up in `TextLineData::attribute()`? Or, alternatively: Measure the time it takes for kate/kwrite to open the file and then go to the end. Then compare this before and after your patch. Do you see anything in the order of ~75% reduction for the time then too? Note how callgrind only measure instructions, so a supposed reduction of 75% of instructions should certainly have an impact on time too - of course not 75% too... I simply cannot fathom why you are seeing such an impact but I cannot reproduce this at all!
I've done some measurements, as the times are so big, with a stopwatch 2 times each test.
With "Enable autodetection of Language" and "Automatic spell checking enabled by default" enabled,
the test as before: since pressing "Temporarily raise limit and reload file", press Ctrl+end and finish the scroll to the end of the document.
without any version of the patch:
1 min 25 seconds
With @mwolf solution, used only in spellCheckWrtHighlightingRanges.
38 seconds
With the binary search:
34 seconds
REPOSITORY
R39 KTextEditor
REVISION DETAIL
https://phabricator.kde.org/D11487
To: jtamate, #frameworks, #kate
Cc: anthonyfieroni, dhaumann, mwolff, cullmann, michaelh, kevinapavew, ngraham, demsking, sars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180322/6962af3b/attachment.html>
More information about the Kde-frameworks-devel
mailing list