Closed Bug 597416 Opened 14 years ago Closed 13 years ago

CPU usage with test case is 42% on 4.0b8pre with D2D enabled vs 33% on 4.0b8pre with D2D disabled

Categories

(Core :: Graphics, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: scoobidiver, Unassigned)

References

()

Details

Attachments

(2 files)

Build : Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7pre) Gecko/20100917 Firefox/4.0b7pre Every tests have been done with a new profile. In the ref URL, without playing any video, on my T4300 Pentium : * with HW acceleration, CPU usage is about 65% * without HW acceleration, CPU usage is about 45% The goal of HW acceleration is to decrease CPU usage, not the contrary. Adapter Description : Mobile Intel(R) 4 Series Express Chipset Family Vendor ID : 8086 Device ID : 2a42 Adapter RA : MUnknown Adapter Drivers : igdumd64 igd10umd64 igdumdx32 igd10umd32 Driver Version : 8.15.10.2202 Driver Date : 8-25-2010 Direct2D Enabled : true DirectWrite Enabled : true GPU Accelerated Windows : 1/1 Direct3D 9
Rest of the benchmark on my T4300 Pentium : * FF 3.6.10 : CPU usage is about 12% * ie 8 : CPU usage is about 3%
Blocks: 598584
In order to find a regression range, I set gfx.font_rendering.directwrite.enabled to true and mozilla.widget.render-mode to 6 and I scanned old builds. CPU usage with D2D ON has always been 60% as soon as mozilla.widget.render-mode exists, in March 2010 builds. CPU usage with D2D OFF was 12% before 27/08/2010 (see bug 598584).
Summary: CPU usage with flash video in pause is 40 % higher with HW accel than without it → [D2D] CPU usage with a flash video in pause is 5 times higher with D2D ON than without
blocking2.0: --- → ?
This is a dupe of a very old existing bug, but I can't find it. It's caused by alpha recovery we have to do here. We're looking into some workarounds and have an extension pending for the NPAPI spec that should allow flash to do something faster.
First let me note this is only about places that use flash windowless. Fwiw I do not think we should block on this. We're experimenting with ways to 'special-case' flash in case it happens to correctly write alpha values into the DC. But we cannot do this in general since the current NPAPI spec does not require it. We could also respect the 'opaque' flag in some cases for windowless plugins but but we're not sure if that's going to help us a lot. Other than that we could move this work to the plugin process but fundamentally other than that there's not a whole lot we can do about this without changing the NPAPI spec.
So Flash is invalidating itself even though it's paused?
I must honestly say I didn't try with something paused.
I think the "paused" part here is pretty key from my point of view... Either Flash is totally misbehaving when paused, or something is broken, imo.
(In reply to comment #9) > I think the "paused" part here is pretty key from my point of view... Either > Flash is totally misbehaving when paused, or something is broken, imo. I agree, we shouldn't be redrawing it when paused. And therefor it shouldn't be using CPU.
Bug 596451 will change this. At least the extra CPU usage will move out of the browser process into the plugin process. Also, there are some possible improvements I mentioned in that bug. Let's wait for 596451 to be fixed and then reevaluate this bug.
Depends on: 596451
No longer blocks: 598584
blocking2.0: ? → ---
Blocks: slowui
This particular flash seems to send 3 InvalidateRect's every time we ask it to paint.
Ah, and then those trigger us asking it to paint again?
Is there a way not to take into account these recurrent events to prevent this loop without perturbing the Flash behavior for others sites, or is it a Flash bug, or is it a tech evangelism bug ?
> https://bugzilla.mozilla.org/show_bug.cgi?id=596451 is fixed. Any bit better > now? I will answer you as soon as bug 612515 and bug 612123 are fixed.
Depends on: 612515, 612123
There is a workaround for bug 612515: turning off HW acceleration on a website with no Flash animations. So here are my new results: 4.0b8pre/20101115 build with HW accel. and aero theme: 40% (better than 65%) 4.0b8pre/20101115 build without HW accel. and aero theme: 33% (better than 45%) 4.0b8pre/20101115 build with HW accel. and basic theme: 30% 4.0b8pre/20101115 build without HW accel. and basic theme: 23% FF 3.6.12 with aero theme: 10% FF 3.6.12 with basic theme: 7% bug 596451 brings an improvement in performances, but not enough to fix this bug: 1. HW acceleration increases the CPU usage of 30% (instead of 45% before). 2. FF 4.0 increases the CPU usage of 300% wrt FF 3.6.12. (instead of 450% before) 3. Aero theme increases the CPU usage of 30% wrt basic theme (bug 598584 for aero). May be item 1 and 2 must be splitted in two bugs.
No longer depends on: 612123, 612515
Scoobidiver, any chance you could post your latest perf stats for this site with d2d on?
All I'm really curious about are these two numbers: with HW accel. and aero theme: 40% without HW accel. and aero theme: 33%
> Scoobidiver, any chance you could post your latest perf stats for this site > with d2d on? Let's go with build 4.0b8pre/20101205: with HW accel. and aero theme: 42% without HW accel. and aero theme: 32%
According to the last results, I changed the bug title.
Summary: [D2D] CPU usage with a flash video in pause is 5 times higher with D2D ON than without → CPU usage with test case is 42% on 4.0b8pre with D2D enabled vs 33% on 4.0b8pre with D2D disabled
With 6.0b3: with HW accel. and aero theme: 26% without HW accel. and aero theme: 23% I close it as workforme.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: