-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Stepper: Performance fine-tuning #99352
base: trunk
Are you sure you want to change the base?
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~2468 bytes removed 📉 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~1309257 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~3670 bytes added 📈 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for following up in this. I do see a difference in experience. Not everything is preloaded yet in some flows but it's better.
I don't know the code base enough to be able to give a deep review.
One question is whether it's possible to avoid future similar regressions. Are we safe now? Do we need a custom lint rule or something to ensure the chunk names are not forgotten...?
That's great Omar! Is it expected that, if I have the goals-first version, I see the loading before domains? |
Chunk names are just there to help be debugging, they don't make a difference otherwise. The fix is really this. I could write a complicated unit test to test for it, but this part of the code very rarely changes. I doubt it will be worth writing and maintaining. |
It's possibly related to the |
…ypso into fix/preload-after-user
@escapemanuele I made this PR much simpler, and it now only fixes the steps preloading logic and the Help Center preloading. I tested the onboarding flow and no loadings at anymore (besides the one in the design step). |
Changes
Fix preloading
In light of #99158, I investigated why loading states appear between steps when the next step should be preloaded. Turns out, preloading the step that comes after the user step was broken, since #97841.
#97841 broke the assumption that the user step comes at the start of the flow, and this broke the preloading logic. It's my bad because didn't catch that even though I reviewed it. I now shifted to the new design of the user step being at the end.
Annotate all the steps with chunk names
I added chunk names for every step for easier debugging.
Upgrade onboarding flow to the steps list
I moved the onboarding flow to use the steps list so it gets the labeled chunks.
Help Center
The Help Center was being loaded and doing many requests in vain. I delayed its loading until a user is created.
Testing steps
With goals first
treatment_cumulative
bookmarklet.Without goals first
control
bookmarklet.