Bug 171099 - Slow painting of long dynamically wrapped lines
Summary: Slow painting of long dynamically wrapped lines
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-15 10:46 UTC by Alexander Dymo
Modified: 2015-01-06 07:40 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
The test file where cursor movement is slow because of repainting (2.55 KB, text/plain)
2008-09-15 10:47 UTC, Alexander Dymo
Details
Callgrind profile taken during up/down cursor movements in kwrite (245.28 KB, application/x-bzip)
2008-09-15 10:49 UTC, Alexander Dymo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Dymo 2008-09-15 10:46:30 UTC
Version:            (using Devel)
Installed from:    Compiled sources

The long text line when word wrapped in kate/kwrite makes everything (like cursor movement, text insertion, etc.) slow. The callgrind profile (attached) suggests that it's because line repaining takes most of the CPU time.

To reproduce, open any file with a long line which would wrap onto 30-40 "view" lines.

What's interesting is that when you move cursor towards the end of the long line, repainting becomes a little bit faster.
Comment 1 Alexander Dymo 2008-09-15 10:47:39 UTC
Created attachment 27425 [details]
The test file where cursor movement is slow because of repainting
Comment 2 Alexander Dymo 2008-09-15 10:49:03 UTC
Created attachment 27426 [details]
Callgrind profile taken during up/down cursor movements in kwrite
Comment 3 Andreas Pakulat 2008-09-15 11:53:42 UTC
I think kate devs already dealt with the "problem" here:
http://bugs.kde.org/show_bug.cgi?id=169549

I'm not sure and haven't looked at your data, hence not closing it as duplicate yet.
Comment 4 Alexander Dymo 2008-09-15 13:44:24 UTC
Yeah, looks like the same problem, but slowdown is tangible even with 5-10 wrapped lines. I don't know if that can be improved though.
Comment 5 Hamish Rodda 2008-09-16 01:31:49 UTC
I'm aware of these issues and plan to look into them; we may need to switch to having multiple QTextLayouts per dynamically wrapped line :(
Comment 6 Alexander Dymo 2008-10-11 22:05:02 UTC
As it turns out, to really see the problem, you should be running a NVidia card and using the proprietary driver. On a system with an ATI card (also proprietary driver) you can see the problem, but kate and kwrite are perfectly usable. With nvidia, you can't work with wrapped lines at all.
Comment 7 Søren Holm 2008-11-05 21:33:37 UTC
I allso have that problem. What happenend since kde3. On kde3 my nvidia card worked perfectly.
Comment 8 Søren Holm 2008-12-11 01:35:43 UTC
Is it possible to somehow make QT4 behave (from a hardware perspective) like QT3 ?
Comment 9 Alexander Dymo 2009-02-08 02:30:11 UTC
I've just upgraded to Qt 4.5 RC1 (same system with ATI proprietary drivers). The problem is almost solved by the new Qt.

To see the slowdown, you now need to have a long line with more than 15000 characters. 

When launched as "kwrite --graphicssystem raster", slowdown disappears completely and kwrite from KDE4 behaves just like kwrite from KDE3.
Comment 10 Søren Holm 2009-02-08 02:53:39 UTC
This is great news. Is 4.4.3 and 4.5 rc1 binary compatible ?
Comment 11 Christoph Cullmann 2009-04-18 15:59:00 UTC
And therefor there will be no patches to katepart, painting text is expensive, there is not that much room for kate to do it better, still the line needs to be redrawn.
Comment 12 Søren Holm 2009-04-19 02:11:42 UTC
still. kde4 kate is a lot slower than the kde3 version.
Comment 13 Eric S 2015-01-05 22:34:49 UTC
I realize this issue is very old, but why was this issue resolved as invalid? The last comments do not seem to support "invalid", it seems to me.

I found this issue searching the bug tracker because I am running into painful slowdowns with long lines. I assume it is the same problem, but am unsure if I should comment on this issue or open a new.
Comment 14 Søren Holm 2015-01-06 07:40:46 UTC
I think this is still valid although it might be entirely QT reletated.