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

RESOLVED WORKSFORME

Status

()

Core
Graphics
RESOLVED WORKSFORME
7 years ago
2 years ago

People

(Reporter: Grant Galitz, Unassigned)

Tracking

({regression})

Trunk
x86_64
Mac OS X
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

(Reporter)

Description

7 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.
(Reporter)

Comment 1

7 years ago
This is a very recent regression!
OK, what's the regression range?
blocking2.0: --- → ?
Keywords: regression

Updated

7 years ago
Version: unspecified → Trunk
Please confirm & renom when we get a range.
blocking2.0: ? → ---
Keywords: regressionwindow-wanted
(Reporter)

Comment 4

7 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?
(Reporter)

Comment 7

7 years ago
Back burner this until I find what build seems to have started this prob for me.
(Reporter)

Comment 8

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

Comment 9

7 years ago
Like nothing changed in reality, except the processing was consolidated to one thread?
(Reporter)

Updated

7 years ago
Summary: Rendering to a canvas just got ~5 times slower. → Rendering to a canvas just got ~5 times slower/heavier.
(Reporter)

Comment 10

7 years ago
anyone else willing to comment or to test this out further?
(Reporter)

Comment 11

7 years ago
Seems to have gotten better. weird

Comment 12

7 years ago
I can't reproduce this with Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 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.