Bug 185778 - huge cpu usage during cursor movement
Summary: huge cpu usage during cursor movement
Status: CLOSED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-28 09:19 UTC by Søren Holm
Modified: 2009-09-02 22:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Søren Holm 2009-02-28 09:19:45 UTC
Version:           3.2 (using KDE 4.2.0)
OS:                Linux
Installed from:    Ubuntu Packages

Moving the cursor around in kate take too much cpu. In my test I create a textfile containing a square of 80x40 a's. Opening it in kate and sizing the window to contain the letters. Then I place the cursor in top left corner and press and hold right arrow. The cpu-usage rises to the folllowing:

With composition enabled :
Kate : 47 %
Xorg : 23 %
Kwin : 13 %

With composition enabled :
Kate : 47 %
Xorg : 18 %
Kwin : 2-3% the same as before moving the cursor

It is the same with both vesa- and nvidia-driver
Comment 1 Søren Holm 2009-03-01 00:11:11 UTC
After investigating further, it seems like kate redraws every line from the current line and down - at least that is what kwin tells me. And kate is actually not bad compared to apps embedding katepart. Kdevelop redraws the whole textedit-area every time the cursor is moved, and Kile draw the textedit-area plus some toolbars and stuff.
Comment 2 Søren Holm 2009-03-05 21:05:20 UTC
With newest kde (4.2.1) the problem is reduced to 17% to kate and 16% to kwin. It is way better, but I still tinks that kate uses to many ressources for at normal cursor movement.
Comment 3 Søren Holm 2009-03-05 21:12:43 UTC
... ehm I forget to mension that Xorg dropped to around 7%. I guess it is a combination of kde 4.2.1 and QT 4.5.0 which is also on ubuntu jaunty.
Comment 4 Christoph Cullmann 2009-04-30 12:40:31 UTC
I use Kate here with QT 4.5 and raster engine, works fine, 3-5% cpu, while moving cursor or scrolling. Without raster, it may be different, but anyway, no chance to alter this behaviour, anti-aliased text rendering is expensive, the nvidia/ati/... drivers tend to improve, so does Qt. Nothing I see we can do. If you have concrete ideas where to alter the code to improve it, please open new enhancement, we will be open to any ideas.