<table><tr><td style="">sars 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/D17241">View Revision</a></tr></table><br /><div><div><p><a href="https://phabricator.kde.org/p/dhaumann/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@dhaumann</a> OK the limit is too low for Kile that is clear. Visual Studio Code is limiting the highlighting on a line to 10000 characters.</p>

<p>I tried to set the limit to 10000, but that was very noticeably slow. Selecting a whole line took multiple seconds, which is probably the reason why we have had 4096 as the wrap limit ;)</p>

<p>Is it the whole idea of limiting the highlights or just the too low limit that you object to?</p>

<p>The main hotspots I see in my perf/hotspot profiling is RenderRangeList::advanceTo(...) in  KateRenderer::decorationsForLine() and in KateRenderer::paintTextLine() the hotspot is QTextLayout::draw() (especially the one with "additionalFormats").</p>

<p>In both places I don't see (right now at least) very many possibilities to optimize.</p>

<p>I think the main problem is that we draw the whole line at once even tho we only see just a tiny bit of it (when we have long lines).</p>

<p>"Fixing" this problem would probably require that we also start to draw the lines in chunks...</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/D17241">https://phabricator.kde.org/D17241</a></div></div><br /><div><strong>To: </strong>sars, cullmann, vkrause, dhaumann, mwolff<br /><strong>Cc: </strong>zetazeta, mwolff, brauch, kwrite-devel, kde-frameworks-devel, hase, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>