Closed Bug 958823 Opened 10 years ago Closed 2 years ago

Three.js canvas renderer is super-slow in Firefox compared to Chrome on Android

Categories

(Core :: Graphics: Canvas2D, defect)

defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: cwiiis, Unassigned)

References

()

Details

Going to the given URL in Firefox for Android results in 0-2fps, where as it's a smooth 30+fps in Chrome. I'm guessing that for whatever reason, this isn't hitting our accelerated canvas fast-paths?

Tested on a Google Nexus 5 with today's Nightly.
Yeah I noticed this too. Weird. I'll look at it.
FWIW, this demo is slow in windows7 also, compared to chrome.

Nightly+omtc+new textures : 23FPS
Chrome32 : 43 fps
On the Mac: nightly ~ 3-7fps, Chrome: 60fps.  Do we know if this is canvas or webgl side that's slowing things down?
OS: Android → All
Actually, I think I can answer that - it's Canvas2D.  WebGL seems to be OK on it's own (e.g., ~60fps).
On the Mac, Fill and FillRect add up to 60%.
(In reply to Milan Sreckovic [:milan] from comment #5)
> On the Mac, Fill and FillRect add up to 60%.

Yeah, looks like Skia is doing a readback here for some reason. Digging some more.
Looks like it's drawing one canvas into another, which is known to be slow right now.
Gets fast with shared-GLContexts!
(In reply to Vladimir Vukicevic [:vlad] [:vladv] from comment #8)
> Gets fast with shared-GLContexts!

It seems that way to me too, did you try it? It makes sense.
So https://bug935688.bugzilla.mozilla.org/attachment.cgi?id=828213 is fast for me, which does the same thing, but this bug is still present on Mac at least. Strangeness.
(With bug 939276 patches applied, that is)
Assignee: nobody → snorp
Ok, not sure what I was doing before, but this does in fact appear to be fixed by bug 939276
Depends on: 939276
Hi James, not sure what you was doing in #939276 but in Firefox 29(mac) this still creeps with 2-4 Fps.
(In reply to Alex from comment #13)
> Hi James, not sure what you was doing in #939276 but in Firefox 29(mac) this
> still creeps with 2-4 Fps.

Ah, I was talking about the performance with SkiaGL enabled, which is not the default (yet). I don't think this is going to ever be fast under the default CoreGraphics backend, unfortunately.
Not sure if it helps but, three.js example given here seems to be quite complicated. I get the slowdown even for the simplest canvas renderer example:

http://threejs.org/examples/canvas_geometry_cube.html

On my nexus 7 (android 4.4.4 - kitkat) I get the following numbers:

Firefox for android (v31.0): 3-4 fps
Chrome for android (v36.0.1985.131): 60 fps (capped)

By the way, does this mean it will have the same problem in FirefoxOS?

The bug assignee didn't login in Bugzilla in the last 7 months.
:lsalzman, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: snorp → nobody
Flags: needinfo?(lsalzman)
Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(lsalzman)
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.