This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The default behaviour of Tanstack Router is to wait at least 500ms before showing the rendered route, so that the loading spinner doesn't flicker. We don't want that, as we don't seem to have a working loading spinner anyway, and this just unnecessarily adds FCP latency.
sandhose
force-pushed
the
quenting/lazy-load-all
branch
from
July 31, 2024 12:36
1666f74
to
92aadf8
Compare
Deploying matrix-authentication-service-docs with Cloudflare Pages
|
reivilibre
approved these changes
Aug 1, 2024
Comment on lines
+50
to
+54
loadPromise | ||
.then(({ estimatePasswordComplexity }) => | ||
estimatePasswordComplexity(deferredPassword, t), | ||
) | ||
.then((response) => setResult(response)); |
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.
will this potentially 'queue up' a bunch of .then
tasks and then run them all at once when the import loads?
e.g. it might trigger multiple times if the user started typing a password before it finishes loading? Further, if the tasks run out of order, it might set the wrong score on the form?
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.
It will, but I wouldn't worry too much about it? 🤷
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This lazy-loads all routes, to trim down the main bundle as much as possible, and optimise for the first contentful paint.
This can be reviewed commit by commit.
getNinetyDaysAgo
to a shared utility: Just some code deduplicationOne thing I noticed is that for some reason, the loaders aren't kicking in until the page components are loaded. They should load in parallel, because this adds a bit to our loading waterfall. I asked on the Tanstack Router discord to see what they think about it.
Non-scientific measurements
This is on the Slow 4G preset
Password recovery page
Before
After
Account home
Before
After