Bug 170322 - very laggy performance with files with extremely long lines
Summary: very laggy performance with files with extremely long lines
Status: RESOLVED DUPLICATE of bug 169549
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 210879 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-03 15:56 UTC by Stefan Radermacher
Modified: 2009-10-23 15:09 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Sample data file for PCGen application (56.72 KB, text/plain)
2008-09-03 16:07 UTC, Stefan Radermacher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Radermacher 2008-09-03 15:56:52 UTC
Version:            (using KDE 4.1.0)
Compiler:          gcc 4.2.2 
OS:                Linux
Installed from:    Compiled From Sources

When editing files with very long lines (like several hundred characters) containing lots of tabs, Kate slows down to a crawl. Cursor movement via arrow or page up/down keys takes several seconds per keypress on a fast dual core system.
Comment 1 Stefan Radermacher 2008-09-03 16:07:18 UTC
Created attachment 27209 [details]
Sample data file for PCGen application

This is a data file that triggers the described problem.
Comment 2 Andreas Pakulat 2008-09-03 23:36:07 UTC

*** This bug has been marked as a duplicate of bug 169549 ***
Comment 3 Stefan Radermacher 2008-09-03 23:51:14 UTC
Bug 169549 is not exactly a duplicate, this file has several lines of line length about 700, it is not a one-line file.
Comment 4 Eike Hein 2008-09-04 14:13:52 UTC
Andreas: I disagree with this DUPE'ing as well. A single-line HTML file as in bug #169549 is not a realistic use case for a text _editor_; this however is an actual hand-edited data format used in connection with a relatively major FOSS application. Furthermore, it's a regression over KDE 3, where Kate used to handle the same files just fine.
Comment 5 Andreas Pakulat 2008-09-04 17:30:44 UTC
Eike: Its still a file with rather long lines and as you can see in in the other bugreport thats something that simply won't ever be "quick and fast".

Besides that, yes Kate in KDE4 is in general quite a bit slower than in KDE3, but I'm not sure its kate's fault - Qt itself also still is lacking performance-wise.
Comment 6 Stefan Radermacher 2008-09-04 17:49:00 UTC
That is very unfortunate, as it is vital for me to edit this kind of files. It's basically a show-stopper for KDE4 for me. :(
Comment 7 Andreas Pakulat 2009-10-17 14:57:05 UTC
*** Bug 210879 has been marked as a duplicate of this bug. ***
Comment 8 Pascal Létourneau 2009-10-18 01:43:33 UTC
SVN commit 1036862 by pletourn:

Render the tabstops non-antialiased
Look as good as before and much faster (on X11)

CCBUG:170322


 M  +12 -13    katerenderer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1036862
Comment 9 Dominik Haumann 2009-10-18 14:06:39 UTC
SVN commit 1037102 by dhaumann:

backport SVN commit 1036862 by pletourn:

Render the tabstops non-antialiased
Look as good as before and much faster (on X11)

CCBUG:170322


 M  +12 -13    katerenderer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1037102
Comment 10 Stefan Radermacher 2009-10-20 10:24:22 UTC
I'v e built Kate with this fix, and it slightly improves the speed. however when handling lines of about 1000 characters length that contain many tabstops, it is still too slow to be of use in this mode; as an example, going to the end of the line from the start by using the End key still takes several seconds.

However, this fix prompted me to try and switch off the display of the tabstop symbol, and as soon as this is done, Kate is as fast as ever. Having the tabstops visible would be nice though.

It appears that the change of the tabstop symbol from the simple dot in KDE 3 to the "»" sign in KDE 4 actually causes this regression. Maybe it would be possible to add the old tabstop symbol back in as a third option besides just "on" and "off"?
Comment 11 Dominik Haumann 2009-10-20 20:30:14 UTC
No additional option. Maybe this can be solved by also solving bug #173699.
If we still want characters instead of the three dots (KDE3), maybe it needs to be cached on a pixmap.
Comment 12 Pascal Létourneau 2009-10-20 21:03:07 UTC
SVN commit 1038175 by pletourn:

Optimize tabstop drawing
Also remove a no longer needed workaround

CCBUG:170322


 M  +5 -4      katerenderer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1038175
Comment 13 Stefan Radermacher 2009-10-23 15:09:20 UTC
SVN commit 1038175 effects a noticeable improvement here. Moving from the start of a line (about 1500 colums with many tab stops) to the end of the line and back is still not as instantaneous as in the KDE 3 Kate, but this change makes Kate actually usable again. thanks!