Open Bug 851062 Opened 11 years ago Updated 2 years ago

RIABench "2D-Test" drawing tests is 2x slower than Chrome on Windows

Categories

(Core :: Graphics, defect)

x86
Windows 7
defect

Tracking

()

People

(Reporter: bzbarsky, Unassigned)

References

()

Details

Filing under graphics, because on Mac we kick their butt on this one, so it's not likely to be JS or DOM.

STEPS TO REPRODUCE:

1)  Load http://www.timo-ernst.net/misc/riabench-start/2dtest/javascript
2)  Wait for the FPS number.

EXPECTED RESULTS:  Large number (e.g. on Mac I get 42).

ACTUAL RESULTS: Small number, apparently, according to http://media.bestofmicro.com/A/F/376215/original/RIABenchWin8.png (they got 11, while the Chrome score they see is comparable to the one I see on Mac).

MORE DETAILS: See http://www.tomshardware.com/reviews/web-browser-chrome-25-firefox-19,3459-6.html
Is this still an issue? Are the RIABench drawing tests still slower on Windows Firefox than Chrome?
OS: Mac OS X → Windows 7
In the June 2013 WBGP, Firefox is still 2x slower than Chrome on the "2D-Test" drawing test:

http://www.tomshardware.com/reviews/chrome-27-firefox-21-opera-next,3534-6.html

http://media.bestofmicro.com/L/A/390862/original/RIAJS.png
Summary: Much slower than Chrome on the RiaBench drawing tests on Windows → RIABench "2D-Test" drawing tests is 2x slower than Chrome on Windows
I'm on Windows 7. The problem is with hardware acceleration. Without it I got an average of 15 fps. With I got 1 fps. Tested on Firefox 26 Beta. Chrome 31 got 10 fps.
Looks like lots of small clearRects, setting of fillStyle, and fillRects. Not sure why we're slow.
Bas, is there any particular reason why D2D should be slow with a lot of small fillRects with different colors?
Flags: needinfo?(bas)
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #5)
> Bas, is there any particular reason why D2D should be slow with a lot of
> small fillRects with different colors?

It's a pretty bad scenario for Direct2D. We're filling very few pixels per drawing call, and D2D is relatively high overhead per draw call. It'll do a lot of complicated work to do this. Fwiw, there's probably some complicated work we can do to improve the situation. But this is a pretty silly test and whatever we do would be pretty focused on this test.
Flags: needinfo?(bas)
Actually I don't think this test is all that silly. Lots of small fills is a completely reasonable thing to do.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.