Bug 19378 - Excessive CPU usage
Summary: Excessive CPU usage
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://www.pvteens.org
Keywords:
: 19372 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-03 12:28 PDT by Eric Caldwell
Modified: 2023-06-03 16:44 PDT (History)
3 users (show)

See Also:


Attachments
Image showing CPU usage (123.12 KB, image/png)
2008-06-03 12:31 PDT, Eric Caldwell
no flags Details
top comparison of WebKit r34342 vs Firefox 3 (2.29 KB, image/png)
2008-06-03 13:40 PDT, Geoffrey Garen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Caldwell 2008-06-03 12:28:33 PDT
The site www.pvteens.org causes the WebKit and Safari CPU usage to hit 97% and above. I was told to file a bug report when I reported this in the webkit blogs.
Comment 1 Eric Caldwell 2008-06-03 12:31:05 PDT
Created attachment 21483 [details]
Image showing CPU usage
Comment 2 Matt Lilek 2008-06-03 12:38:06 PDT
*** Bug 19372 has been marked as a duplicate of this bug. ***
Comment 3 Matt Lilek 2008-06-03 12:43:26 PDT
On my 2 GHz Core 2 iMac, even in a debug build, this only spikes at about 75% and then comes down to 30%-ish for a little bit and then drops to almost nothing.

The top of the profile for my debug build is:
Total number in stack (recursive counted multiple, when >=5):
        191       WebCore::RenderBox::computeAbsoluteRepaintRect(WebCore::IntRect&, bool)
        173       WebCore::RenderBox::absolutePosition(int&, int&, bool) const
        158       WebCore::RenderObject::absolutePositionForContent(int&, int&, bool) const
        50       -[NSView _convertRect:toAncestor:]
        46       WebCore::Element::recalcStyle(WebCore::Node::StyleChange)
        42       WebCore::RenderBlock::layoutBlock(bool)
        40       WebCore::RenderBlock::layoutBlockChildren(bool, int&)
        39       WebCore::RenderBlock::layout()
Comment 4 Geoffrey Garen 2008-06-03 13:40:35 PDT
Created attachment 21485 [details]
top comparison of WebKit r34342 vs Firefox 3

I tested nightly r34342 on a MacBook Pro Core Duo. I saw Safari hovering just under 20% CPU, with Firefox 3 around 50%. Is there a browser that uses less CPU on this page?
Comment 5 Geoffrey Garen 2008-06-03 13:41:57 PDT
Looking at Shark, I see some CPU spent sending null events to Flash, and some spent animating the image and ad areas on the page. Nothing out of the ordinary. Quartz Debug shows no excessive repaint.
Comment 6 Geoffrey Garen 2008-06-03 13:44:51 PDT
You could reduce CPU usage by removing Flash from the page. Perhaps you could provide movie thumbnails that were just images, and once the user clicked the image, you could swap in Flash elements. That way, Flash wouldn't chew CPU unless the movie was actually needed.

Otherwise, I don't see anything obviously wrong here, especially since the latest WebKit nightly uses so much less CPU than Firefox 3.
Comment 7 Eric Caldwell 2008-06-03 13:58:53 PDT
FF2 hovers at around 65% but Safari, WK and FF3 all maintain around 95% here and I have a fresh install of 10.5.3.

As far as flash on the page, that's probably coming from the embedded YouTube vids since I didn't personally embed any flash.
Comment 8 Ahmad Saleem 2023-06-03 16:44:59 PDT
Without reduction, it would be difficult to reproduce this bug today since WebKit has evolved a lot and Flash is gone now as well and the website is also updated.

I think it is time to mark this as 'RESOLVED WONTFIX' unless if it is reproducible, please reopen again.