D17241: WIP:Disable highlighting after 512 characters on a line.

Kåre Särs noreply at phabricator.kde.org
Thu Jan 3 07:44:13 GMT 2019


sars added a comment.


  @dhaumann OK the limit is too low for Kile that is clear. Visual Studio Code is limiting the highlighting on a line to 10000 characters.
  
  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 ;)
  
  Is it the whole idea of limiting the highlights or just the too low limit that you object to?
  
  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").
  
  In both places I don't see (right now at least) very many possibilities to optimize.
  
  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).
  
  "Fixing" this problem would probably require that we also start to draw the lines in chunks...

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D17241

To: sars, cullmann, vkrause, dhaumann, mwolff
Cc: zetazeta, mwolff, brauch, kwrite-devel, kde-frameworks-devel, hase, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190103/d9e18154/attachment-0001.html>


More information about the KWrite-Devel mailing list