-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
www.pokedex.org - see bug description #2082
Comments
Thanks @flaki Running on desktop with a chrome mobile UA to bypass the UA sniffing And clicking around doesn't show any performance issues. So if there is an issue with Firefox Android, it's probably really specific to that context. I can confirm it is laggy on Firefox Android. In this screenshot of a performance recording when typing the first character on the top left and focusing on the moment where it seems stalled:
|
https://www.pokedex.org/js/main.js has a couple of calls to requestAnimationFrame |
I wonder if it's related to this bug https://bugzilla.mozilla.org/show_bug.cgi?id=949409 |
I tested this on a Moto X and a Firefox OS Z3. Performance is not actually that bad here. @flaki do you know if some work was done here already? When profiling I see lots of small chunks of style recalculation, but most of it seems related to animation/transition stuff, and short-lived. Looking at Karl's screenshot, it would be very interesting to know what script set some element.style.foo to a value that caused 194 milliseconds of style recalculation. That seems really excessive.. There's a function o combining setting style properties and requestAnimationFrame here:
but of course I can't tell from a glance if this is indeed the code causing that log entry - though the scaleY(0.01) thingy seems like it might be expensive, depending on what it's applied to. (It also seems like a case a smart implementation might optimize away with shortcuts..) PS: Bugzilla 949409 might be more about CSS positioning, can't tell if it's relevant. |
Hi! Thanks all for investigating! With that, I'm testing on Firefox OS (Z3c, nightly-latest), and the most visible profiling issue does indeed seem to arise in those The performance on both Android & FxOS (Z3c both) seems rather similar, although FxOS seems more fluid (Fennec scroll performance feels a bit choppier, while FxOS is pretty smooth to the eye). My only concern, though, is the long (1-2 sec) delay after clicking a pokemon and their respective datasheet coming up - this is a very apparent difference from the Chrome version. For the reason, I couldn't come up with anything (maybe the rAF issue above?), but testing on desktop does occasionally reveal the same issue (could this be a GC problem? Feels similar, indeed...). Thanks for working on this! Sorry that I couldn't be of more help. :( |
Thanks to everyone for looking into this! I was really surprised by the results, since it's so smooth in mobile Chrome. I'm basically following @paullewis's advice from "FLIP your animations" for these animations. Supposedly the Maybe this "FLIP" advice only works well for WebKit/Blink browsers? Wondering if I should have tried out the Web Animation API (with a polyfill) instead. I'll note, however, that the scroll performance is also pretty laggy on Firefox compared to Chrome. It's been suggested in nolanlawson/pokedex.org#35 that excessive |
Note, running this in a debug windows build gives me a bunch of warnings about bad surface sizes. This could be will-change at work.
I'm doing an opt build with symbols so I can get a better profile. |
Looking at profiles from Firefox (on device), one of the interesting issues is that Firefox needs a bit of time to handle the getBoundingClientRect() call after |
Pokedex performance issues being investigated here: https://bugzilla.mozilla.org/show_bug.cgi?id=1227748 |
URL: https://www.pokedex.org/
Browser / Version: Firefox for Android 45.0
Operating System: Android 5.1.1
Problem type: Something else - I'll add details below
Steps to Reproduce
More information on the bug:
nolanlawson/pokedex.org#35
The text was updated successfully, but these errors were encountered: