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

Improve prefetch perf for CSS side effects #12889

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

markdalgleish
Copy link
Member

@markdalgleish markdalgleish commented Jan 29, 2025

CSS side effects are currently treated as if they were defined as part of a route's links function. While this kept things conceptually simple, it meant that we're blocking on the route module being loaded before we begin prefetching these styles on navigation.

We can do better than this since we already know about them up front in the manifest as route.css before loading the route module, so this PR hoists the prefetching of CSS side effect links up to run in parallel to the loading of the route module.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link
Contributor

@brophdawg11 brophdawg11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet - this makes sense to me!

@markdalgleish markdalgleish merged commit 45beb8d into dev Jan 29, 2025
5 checks passed
@markdalgleish markdalgleish deleted the markdalgleish/prefetch-route-css-perf branch January 29, 2025 23:25
Copy link
Contributor

🤖 Hello there,

We just published version 7.2.0-pre.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Copy link
Contributor

🤖 Hello there,

We just published version 7.2.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Copy link
Contributor

github-actions bot commented Mar 6, 2025

🤖 Hello there,

We just published version 7.3.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants