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

chore: improve $state.frozen performance in prod #11852

Merged
merged 3 commits into from
May 31, 2024
Merged

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented May 31, 2024

When we're in prod, let's avoid using Object.freeze entirely. Instead we can add a symbol to the object to indicate that it's frozen instead and to avoid proxying it. This should significantly improve runtime performance in certain use-cases.

Copy link

changeset-bot bot commented May 31, 2024

🦋 Changeset detected

Latest commit: e2b3a53

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

This PR includes changesets to release 1 package
Name Type
svelte 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

@trueadm trueadm merged commit 5f218b5 into main May 31, 2024
8 checks passed
@trueadm trueadm deleted the faster-frozen-prod branch May 31, 2024 15:17
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.

None yet

2 participants