Closed Bug 716121 Opened 13 years ago Closed 8 years ago

Poor canvas performance (only on Linux) compared to Chrome

Categories

(Core :: Graphics: Canvas2D, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1010527

People

(Reporter: marco, Unassigned)

References

()

Details

http://www.scirra.com/labs/perftest-webgl
For this test, that uses WebGL: Firefox ~16000, Chrome ~12500

http://www.scirra.com/labs/perftest-2d/
For this, that uses Canvas: Firefox ~850, Chrome ~2200.


Note that the performance on Windows is really better (also with WebGL).
Depends on: 723110
Performance with Skia is a bit better, but still far from Chrome. Firefox ~1800, Chromium ~3000.
I wonder what's the cause of this difference, as we are faster with WebGL.
Blocks: 768959
Here are some updated tests with newer, faster JS code:
http://www.scirra.com/labs/perftest2-webgl
http://www.scirra.com/labs/perftest2-2d
(In reply to ashley from comment #2)
> Here are some updated tests with newer, faster JS code:
> http://www.scirra.com/labs/perftest2-webgl
> http://www.scirra.com/labs/perftest2-2d

After enabling the WebGL path for Android, I'm getting ~8k objects at 30fps on my nexus 4.
The canvas2d path gets only about 125 before dropping below 30fps. I would strongly recommend reevaluating the choice to disable webgl for android.
Actually, it's been 11 months, so I'm not sure how much those tests reflect current behavior.
Depends on: 740200
No longer blocks: 768959
Still an issue.
http://www.kevs3d.co.uk/dev/canvasmark/
Chrome score: 6096
Firefox score: 4961
Some very noticeable lag spikes in Firefox ( we've experienced similar issues in our games )
Still an issue in Firefox 41.

Try these tests and compare to Chrome, FF is 1/10 the speed

http://phrogz.net/tmp/image_move_speed_canvas.html
http://phrogz.net/tmp/image_move_sprites_css.html
(In reply to donrhummy from comment #6)
> http://phrogz.net/tmp/image_move_speed_canvas.html
190 vs 160 fps (Firefox vs Chrome respectively)

> http://phrogz.net/tmp/image_move_sprites_css.html
130 vs 160 fps (Firefox vs Chrome respectively)

The above are the results on my system. Chrome is definitely not 10x faster as claimed in comment 6, in fact Firefox is faster in one case. It might help to get some system information so we can benchmark and debug this on a level playing field.
(In reply to Anthony Hughes, QA Mentor (:ashughes) from comment #7)
> (In reply to donrhummy from comment #6)
> > http://phrogz.net/tmp/image_move_speed_canvas.html
> 190 vs 160 fps (Firefox vs Chrome respectively)
> 
> > http://phrogz.net/tmp/image_move_sprites_css.html
> 130 vs 160 fps (Firefox vs Chrome respectively)
> 
> The above are the results on my system. Chrome is definitely not 10x faster
> as claimed in comment 6, in fact Firefox is faster in one case. It might
> help to get some system information so we can benchmark and debug this on a
> level playing field.

Linux 3.16.7-21-desktop
openSUSE 13.2 (Harlequin) (x86_64)
KDE 4.14.9
AMD A4-3400 APU with Radeon(tm) HD Graphics (dual core)
Using the test in comment 6 I do see an issue on my system running Mac OS 10.11

> Firefox 41: 9081 [baseline]
> Firefox 44: 6949 [- 23.48%]
>  Chrome 45: 9714 [+  6.97%]

That said I'm not sure the best way forward. If this bug report is about identifying situations where Firefox isn't competitive then I think it's made redundant by bug 561361. If instead this is about something more concrete and actionable then I think it needs to be better defined and made a dependency of a "make Canvas 2D perf better" metabug.

Jeff, I trust you're the best person to figure out how we should proceed.
Flags: needinfo?(jgilbert)
This is either lack of accel canvas or slow accel canvas compositing.
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(jgilbert)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.