Closed
Bug 415423
Opened 17 years ago
Closed 17 years ago
CPU at 100% with canvas in Firefox 3b
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: alberto.email, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9b2) Gecko/2007121120 Firefox/3.0b2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9b2) Gecko/2007121120 Firefox/3.0b2
With Firefox 2 the page works fine, but with Firefox 3b, if I leave the animation without the aperture, after a while Firefox reaches 100% of cpu usage... It does not happen with Firefox 2
Reproducible: Always
Steps to Reproduce:
1. Load the page http://alberto.orlandini.googlepages.com/barberspole.html
2. Remove the aperture (Click on Show)
3. Wait a while and open Task Manager / System Monitor
Expected Results:
Firefox 3b reaches 100% of cpu usage
Firefox 2 works great, and cpu usage stays lower than 2%
There's a missing ctx.beginPath(); in moveclip() under if(!FLAGhide || true).
So if there's !FLAGhide, there's no beginPath() call at all which seems to be what's causing the CPU usage to spike.
I'm not familiar with the details of canvas of how canvas works under the hood and why it works on FF2 but not FF3, but sticking a ctx.beginPath(); in the indicated location fixes it.
Comment 2•17 years ago
|
||
On Windows XP using a branch build it is 61% and on trunk indeed 100% CPU.
Reporter | ||
Comment 3•17 years ago
|
||
Thanks for the answers! Ok I've corrected the code:
http://alberto.orlandini.googlepages.com/barberspole2.html
Now it works fine on Windows XP, total cpu usage is lower than 2%.
Yet, I tried it on ubuntu feisty with FF 2.0.0.3, firefox cpu usage is around 2% but Xorg is very high, over 60%...
I hope new versions of FF for linux have solved this problem...
Comment 4•17 years ago
|
||
One-day-range:
http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=2007-10-09+22%3A00&maxdate=2007-10-11+00%3A00
Bug 296904 seems to have caused this.
Blocks: 296904
Status: UNCONFIRMED → NEW
Component: General → Layout: Canvas
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → layout.canvas
Version: unspecified → Trunk
Yep, was caused by bug 296904, though that patch is still correct. Sounds like there was a fix in the original page.
As for the Xorg CPU usage, nothing we can do -- we're simply making requests to draw through Cairo, which is in turn making requests to RENDER/X. You may want to try a different/newer video driver, or experiment with EXA or some of the other options.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•