Skip to content
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

https://data.firefox.com/dashboard/hardware is extremely slow to respond to resize or zoom operations #409

Open
dholbert opened this issue Jan 31, 2022 · 1 comment

Comments

@dholbert
Copy link

STR:

  1. Visit https://data.firefox.com/dashboard/hardware in Firefox or Chrome
  2. Zoom the page (Ctrl+) or resize your browser-window.
  3. Wait to see the page update in response to your change

EXPECTED RESULTS:
The page should repaint with the new zoom level or viewport-size in about the time it takes for its initial rendering (around a second or less).

ACTUAL RESULTS:
On my pretty-fast Lenovo laptop, the page takes over 10 seconds to update its rendering (in Firefox as well as Chrome).

This issue is especially-bad in Firefox since it's long enough to trigger our slow-script notification (if you press any keys or attempt to scroll during the hang), and that notification itself triggers another viewport-resize which queues up another batch of the same slow work to happen again. See bug https://bugzilla.mozilla.org/show_bug.cgi?id=1750463. So instead of a 10-20 second hang, you can stretch it into an indefinite-duration hang (as long as you keep interacting with keypresses or scroll events during the hang).

@dholbert
Copy link
Author

dholbert commented Jan 31, 2022

Nearly all of the work here seems to be calls to getPointAtLength from https://data.firefox.com/static/js/4.582265f3.chunk.js

(Maybe the page is trying to do some sort of intelligent rescaling of its graphed data to the new viewport size, which ends up being more expensive than just rendering it in the first place? It's hard to know, since the JS here is pretty minified.)

Here's a profile captured in Firefox: https://share.firefox.dev/3Hlbyrg
...and in Chrome: https://share.firefox.dev/3rePWHa

In both profiles, there's ~10 seconds' worth of calls to getPointAtLength.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant