Rendering to a canvas just got ~5 times slower/heavier.




8 years ago
3 years ago


(Reporter: grantgalitz, Unassigned)




Firefox Tracking Flags

(Not tracked)


(Whiteboard: [fx4-unco-bugday], URL)



8 years ago
User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b10pre) Gecko/20110111 Firefox/4.0b10pre
Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b10pre) Gecko/20110111 Firefox/4.0b10pre

There used be an average of 4 percent of one CPU core on my macbook pro being used to render the emulator's blitted data to the target canvas, but now it seems to take more on the order of 20% of the CPU to do so. This seems very odd, especially since the canvas is scaled by the nearest neighbor algorithm in this case. The canvas is blitted to every 17 milliseconds when frameskip is off, just in case you're curious.

Reproducible: Always

Steps to Reproduce:
1. Load in a ROM
2. Once the screen appears, record the average CPU load in your CPU monitor.
3. Hide the tab in firefox by viewing another tab and record your CPU load once more.
4. Compare the results from viewing vs. hiding the tabs.
Actual Results:  
Should not be CPU intensive to just render to canvas.

Expected Results:  
Firefox hogging the CPU to render a very small canvas (160 x 144) with nearest-neighbor scaling.

Comment 1

8 years ago
This is a very recent regression!
OK, what's the regression range?
blocking2.0: --- → ?
Keywords: regression
Version: unspecified → Trunk
Please confirm & renom when we get a range.
blocking2.0: ? → ---
Keywords: regressionwindow-wanted

Comment 4

8 years ago
Also, on Ubuntu 10.10, the linux 64-bit version seems to be even worse, because it seems there's a horrible garbage collector pause for when the canvas is scaled up (Gets exponentially worse the larger the scaling that is applied).
Grant, please see comment 2.  We need that information to go anywhere here.
Can't seem to reproduce this on Windows. CPU usage is about the same visible and hidden.

Maybe this is GL-layers only?

Comment 7

8 years ago
Back burner this until I find what build seems to have started this prob for me.

Comment 8

8 years ago
Hmm, maybe the process in which the scaling is done is was changed? I remember kernal_task used to be much higher.

Comment 9

8 years ago
Like nothing changed in reality, except the processing was consolidated to one thread?


8 years ago
Summary: Rendering to a canvas just got ~5 times slower. → Rendering to a canvas just got ~5 times slower/heavier.

Comment 10

8 years ago
anyone else willing to comment or to test this out further?

Comment 11

8 years ago
Seems to have gotten better. weird
I can't reproduce this with Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0.
Last Resolved: 8 years ago
Resolution: --- → WORKSFORME
Whiteboard: [fx4-unco-bugday]
Duplicate of this bug: 635945
Keywords: regressionwindow-wanted
You need to log in before you can comment on or make changes to this bug.