Skip to content

Conversation

maiieul
Copy link
Contributor

@maiieul maiieul commented Sep 5, 2025

What is it?

  • Feature / enhancement

Description

Add an MPA fallback for when SPA navigation is too slow. SPA needs to execute all the bundles to perform CSR. When there are above a 100 bundles this can take >10s. The idea is to fallback to MPA when this happens.

This will only fallback on first navigations if the bundles haven't been preloaded yet. If the bundles have been preloaded or cached by the browser (disk or memory cache), it will always be SPA.

This feature is on by default and can be turned off by the developer with <Link fallbackToMpa={false}>. As explained in the code comments the threshold is not configurable yet. This depends on how well this feature is received in real projects, but also on what the threshold is based on: number of bundles needed to be preloaded for the next route, or the size of these bundles. In the future, we might be able to speed up SPA so much that falling back to MPA will never make sense.

TODO

  • Add docs

Checklist

  • My code follows the developer guidelines of this project
  • I performed a self-review of my own code
  • I added a changeset with pnpm change
  • I made corresponding changes to the Qwik docs
  • I added new tests to cover the fix / functionality

Copy link

changeset-bot bot commented Sep 5, 2025

⚠️ No Changeset found

Latest commit: 4e897f1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@maiieul maiieul self-assigned this Sep 5, 2025
@maiieul maiieul added the COMP: performance This issue is related to a performance problem or bug label Sep 5, 2025
@maiieul maiieul moved this from Backlog to Waiting For Review in Qwik Development Sep 5, 2025
Copy link
Contributor

github-actions bot commented Sep 5, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview b70f6b1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP: performance This issue is related to a performance problem or bug
Projects
Status: Waiting For Review
Development

Successfully merging this pull request may close these issues.

2 participants