-
Notifications
You must be signed in to change notification settings - Fork 419
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
Slow dispatch() during symbolication - 8 seconds of 100% CPU usage checking selectors #5403
Comments
Oh I see, our React tree contains |
Oh right, and after every action, the redux state object has changed (it now contains the updated list of pending libraries), so all the selectors used in I think the real fix is to stop having a connected component for every thread. We can have a regular, not-connected, component as the child of the But even with 2000 connected components, it's silly how much time we're spending checking dependencies of memoized selectors. We're also paying the cost of checking the cache based on a generic |
This was my plan: have the connected component only rendered when its container is marked visible by the intersection observer.
The new version of Note that we don't use that new version of |
I've made that change in #5405. |
Profile: https://share.firefox.dev/41V11ym
Profile with JS execution tracer (short excerpt): https://share.firefox.dev/4hKqDnz
I was loading and symbolicating this profile with
samply load perf.data
: https://share.firefox.dev/4iYLfJNDuring symbolication, the same 21 tracks were visible which are visible when you open the uploaded profile.
The profile has 360 libs that need to be symbolicated.
requestSymbolsWithCallback
does one call todispatch(requestingSymbolTable(lib))
for each of the 360 libs. And each of thosedispatch
calls appears to take a full 10ms! That means 3.6 seconds of CPU usage for dispatching all theserequestingSymbolTable
actions! And another 3.6 seconds once the results have come in.10ms per dispatch is too much. All the time is spent checking whether we need to re-run selectors.
I haven't dug into which selectors we're checking and how many times which level is being checked.
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: