Skip to content

Conversation

@paoloricciuti
Copy link
Member

@PatrickG correctly pointed out that we don't fork every time (for example, we don't do it when the user press the back button) so we have to include settled in the promises to await concurrently.

@PatrickG was also suggesting to always fork if available but I feel that would add more overhead.

WDYT?


Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

@changeset-bot
Copy link

changeset-bot bot commented Oct 27, 2025

🦋 Changeset detected

Latest commit: 94fcc72

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

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

@PatrickG
Copy link
Member

PatrickG commented Oct 27, 2025

I made a little demo to see that always forking is probably better than using settled.
Clicking "show slow stuff" and then navigating to /other takes 10 seconds while only navigating to /other takes 1 second.

nvm, I tricked myself. It only took 10 seconds because in webcontainers we queue requests (which was my idea) :D
I changed somethingSlow() to a normal function and now navigating to /other always takes 1 second. So I guess using settled is fine.

@paoloricciuti
Copy link
Member Author

I made a little demo to see that always forking is probably better than using settled. Clicking "show slow stuff" and then navigating to /other takes 10 seconds while only navigating to /other takes 1 second.

Created #14822 as an alternative...it seems better, I wonder if it could lead to some nasty race conditions tho...let's see

@PatrickG
Copy link
Member

I made a little demo to see that always forking is probably better than using settled. Clicking "show slow stuff" and then navigating to /other takes 10 seconds while only navigating to /other takes 1 second.

Created #14822 as an alternative...it seems better, I wonder if it could lead to some nasty race conditions tho...let's see

I didn't see your response. See my edited comment.

@paoloricciuti
Copy link
Member Author

Oh lol...then nevermind I guess

@Rich-Harris
Copy link
Member

closing in favour of #14829

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants