<table><tr><td style="">cullmann added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D17441">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D17441#373728" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D17441#373728</a>, <a href="https://phabricator.kde.org/p/loh.tar/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@loh.tar</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>I have tried this one. Yes, works much more better! <br />
Nice to see that my own (unloved) patch wake your interest to dig into that issue :-)</p></div>
</blockquote>
<p>:=) Nice that it helps a bit for the speed isue.</p>
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>As usual understand I most of your talk here not really, and these perf protocols give me no light on the first sight. But thank you that you let me participate.</p></blockquote>
<p>perf helps you to easily see the hotspots.</p>
<p>e.g. you run</p>
<p>perf report --call-graph dwarf -F 333 kwrite the_test_file...</p>
<p>do your actions there (here replace all).</p>
<p>Afterwards (or if you want only partial trace, press once CTRL-C), you run for the flat profile</p>
<p>perf report --max-stack 1024 --stdio -g none > report.txt</p>
<p>Then you see directly which functions might need attentions.</p>
<p>If e.g. a function takes 10% cumulative, 10% is spend in it and all stuff it calls.<br />
If you see there strange stuff, like e.g. the saveEditingPositons, that is a nice start for optimizations.</p>
<p>perf report</p>
<p>will allow to have some text ui, or use hotspot for graphical bliss. (or generate flamegraph svgs)</p>
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;">
<ul class="remarkup-list">
<li class="remarkup-list-item">Now, just find all of a char in that fat file is done very quickly</li>
<li class="remarkup-list-item">Doing these tab->semicolon S&R still takes quite a while but works here. System monitor told 1.8G memory was eaten
<br /><br />
I think with this patch need KateSearchBar still some improvement. Like to give a hint that S&R is running and the possibility to abort. Would be good to add some test if a S&R may run out of memory. Not everyone has a lot of RAM available.
<br /><br />
Um, just a stupid question: Is there a need to do the S&R just as it is done currently? So far I understand that, is the only reason why that is so f**antastic slow caused by tons off calls which are intend to track a normal editing.
<br /><br />
Why not simple do the S&R on the raw file, make a diff, highlight the changes and we are done(?) I did the tab->semicolon S&R by sed, just for interest, and it takes 2-3 seconds :-/</li>
</ul></blockquote>
<p>The thing is: is you do that this way, you loose all convenience.<br />
e.g. if the user has marks on lines, they will not move, if there are additional highlighings, they are lost, even if you just replace a few letters somewhere.<br />
All that overhead is there for a reason to have nifty features, if you want raw speed, yes, a script or plain command line tool like sed will always win.<br />
But I think we should try to shave of as much overhead as possible, without crippling the user experience.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R39 KTextEditor</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D17441">https://phabricator.kde.org/D17441</a></div></div><br /><div><strong>To: </strong>cullmann, dhaumann, Kate, loh.tar<br /><strong>Cc: </strong>anthonyfieroni, kwrite-devel, kde-frameworks-devel, hase, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>