<table><tr><td style="">sars created this revision.<br />sars added reviewers: cullmann, Kate, dhaumann.<br />sars added a project: Kate.<br />Herald added subscribers: kde-frameworks-devel, kwrite-devel.<br />Herald added a project: Frameworks.<br />sars requested review of this revision.
</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/D17243">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>visibleRange() has a side-effect that the visible range is updated every time the function is called. This is a big problem in createHighlights().</p>
<p>I created a dummy XML file that has an almost 4096 characters long line. I then used the search plugin to replace >< with >\n< to split the line.</p>
<p>Without the patch on my computer it took 1 min 30s to split the lines.<br />
With this patch the time went down to 48s.</p>
<p>The time is still bad, but much better ;)</p>
<p>I wonder if the comment on line 3318 "//ensure that the view is up-to-date, otherwise 'endPos()' might fail!" warns about some corner case that I have not encountered...</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/D17243">https://phabricator.kde.org/D17243</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/view/kateview.cpp</div></div></div><br /><div><strong>To: </strong>sars, cullmann, Kate, dhaumann<br /><strong>Cc: </strong>kwrite-devel, kde-frameworks-devel, hase, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>