Repository navigation
perf: build transport encoders once instead of on every response - #16406
Closed
Nic-Polumeyv wants to merge 5 commits into
Closed
Nic-Polumeyv wants to merge 5 commits into
Nic-Polumeyv wants to merge 5 commits into
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/c20b5a65f2bf6d4fb3df9cbef91a95bff242245cOpen in Note This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed. |
🦋 Changeset detectedLatest commit: c20b5a6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Nic-Polumeyv
marked this pull request as ready for review
July 18, 2026 15:32
…ransport-encoders # Conflicts: # packages/kit/src/runtime/server/page/actions.js # packages/kit/src/runtime/server/page/data_serializer.js
…ransport-encoders # Conflicts: # packages/kit/src/runtime/app/server/remote/prerender.js # packages/kit/src/runtime/server/page/actions.js
3 of 6 tasks
Member
|
This is the right idea but we can take it a lot further — closing this in favour of #16658 |
elliott-with-the-longest-name-on-github
added a commit
that referenced
this pull request
Aug 5, 2026
This is #16406 but takes the idea to its logical conclusion: by having an internal module where this stuff is managed, we don't need to pass anything around at all and can delete/simplify a bunch of stuff. Once this is in, will rebase #14129 against `version-3` and update it to use this. Co-authored-by: Elliott Johnson <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The encode map derived from the
transporthook was rebuilt on every serialized response: every__data.jsonrequest, every form action response, and every remote function response, including each push from aquery.liveloop.It only depends on the transport hook, which is fixed at server init, where the mirror
decodersmap is already built. Both now come from one pass there, matching what the client manifest already does.The
unevalpaths are untouched sincecreate_replaceriterates the transport lazily.No new test, the existing serialization and remote function suites cover both.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits