Bug 144669 - konqueror consumes much cpu power on a webpage
Summary: konqueror consumes much cpu power on a webpage
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-25 16:27 UTC by Pascal d'Hermilly
Modified: 2008-04-22 13:19 UTC (History)
2 users (show)

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 Pascal d'Hermilly 2007-04-25 16:27:53 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages

Go to http://polforsk.dk/ and see how much cpu power konqueror uses. It also shows when you hover over the menu buttons in the left menu. 
I've confirmed this on several computers.
The site shows up fine on other browsers such as Galeon or firefox.
Comment 1 Tommi Tervo 2007-04-25 16:40:48 UTC
Ubuntu 3.5.6 is a bit sluggish, 3.5 branch svn r643k isn't
Comment 2 Pascal d'Hermilly 2007-04-25 16:45:11 UTC
This also applies to KDE 3.5.5
Comment 3 mutlu inek 2008-04-20 22:59:01 UTC
I cannot confirm this with Konqui from KDE 3.5.9, nor with Konqui from KDE4 trunk, r798847. No significant difference in CPU usage compared to Firefox an Opera or browsing other websites.
Comment 4 James Spahlinger 2008-04-21 10:32:19 UTC
Can't confirm in 3.5.9 either. Closing
Comment 5 Pascal d'Hermilly 2008-04-21 22:29:35 UTC
I'm still experiencing 10-15 % cpu usage in konqueror 3.5.9, so I would like it reopened.
Is there any way I can se which part of the webpage that is pulling these ressources?
Best regards
Pascal
Comment 6 James Spahlinger 2008-04-22 00:13:57 UTC
What hardware are you on? The lot of us seem to be unable to reproduce this. Do you have konq 4.0.3 you can test on? Its hard to guess what part of the page may be the problem, but if its occurring on hovering, its probably the js and those elements of the page. If you can get us some more data I'd be glad to reopen this, as it though we can't reproduce in 3.5.9 or 4.0.3. Thanks.
Comment 7 James Spahlinger 2008-04-22 00:28:09 UTC
I did some further testing. Firefox when hovering over those menu items and moving up and down really fast causes up to 18% CPU usage here, but the browser reacts instantly. Doing the same stress test to konq is getting 10% CPU usage, but the browser reacts instantly. 

I'm not talking about simply hovering the mouse, I'm talking about hovering over the top item on the left, then very quickly moving the mouse down to the bottom menu item on the left. Then immediately going back up to the top element, repeat those motions 10 or so times and watch top in an open konsole. Konq is doing better then Firefox in this test.

You can repeat this test on *any* website with a selection menu on the left hand side that does background changes on hover. Example: http://slashdot.org

I'm going to reopen your bug, and bring this to the attention of the developers, but I'm really not sure that 10% CPU usage is a bug. Thats the computer doing work. There is no lag whatsoever that I can see, and this occurs only when I attempt to abuse it by doing very quick movements as described above. Normal activity never sees my CPU go over 5%.

As a side note, doing any kind of action requiring changes in focus or background will cause a CPU spike. You can test this by opening top (system monitor), and moving your mouse really fast in circles. X (the X windowing system that KDE builds on) will use up to 60% of my CPU.
Comment 8 Harri Porten 2008-04-22 00:44:24 UTC
I can confirm what James said. An increased CPU usage on animations is expected. Something looking as simple as a hover effect is sometimes achieve through rather ineffective means in HTML and JavaScript.

Maybe KHTML could use less CPU, that's true. And in that sense your report is absolutely valid. It's just that it falls in the general "improve performance" task that we are constantly working on. Every optimization that we apply will also benefit this page.

If you think that this site shows a very specific bottleneck we'd need the HTML+JS reduced to a small snippet that we could analyze closer. I hope you do not mind that I close this report until then because I can assure you that we are working on performance improvements based on other sample pages that we have available.
Comment 9 Pascal d'Hermilly 2008-04-22 13:19:49 UTC
I'm not talking about hover-effects. This is simply from having a konqueror open with the site loaded (with the mouse being outside of konqueror). However if I open and go to a new tab or if I minimize konqueror, the CPU usage instantly drops to a zero where it should lie for a static webpage.
I've experienced this on several computers, we have an older computer (600Mhz or so) on my workplace where the computer becomes ridiculously slow when showing this page.

I'm on a Lenovo T61 and using Kubuntu 8.04 KDE 3.5.9 packages.

Perhaps this is a Kubuntu problem, does any of you use kubuntu?