Skip to content

chore: use closures for state proxies #12912

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

Closed
wants to merge 11 commits into from
Closed

chore: use closures for state proxies #12912

wants to merge 11 commits into from

Conversation

Rich-Harris
Copy link
Member

alternative to #12868. This doesn't yet change any behaviour (apart from the one slightly odd test that has been updated), this is just to get a sense of the performance implications

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
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests and linting

  • Run the tests with pnpm test and lint the project with pnpm lint
Copy link

changeset-bot bot commented Aug 19, 2024

⚠️ No Changeset found

Latest commit: 351afa8

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

@trueadm
Copy link
Contributor

trueadm commented Aug 19, 2024

Looks impressive. Here's the benchmark I was using.

Screenshot 2024-08-19 at 21 20 23

Toggle create 10k rows and clear.

@Rich-Harris
Copy link
Member Author

How does that compare to main?

@Rich-Harris
Copy link
Member Author

(also, what of the memory impact — manageable?)

@trueadm
Copy link
Contributor

trueadm commented Aug 19, 2024

This is main. Memory usage is up by about 3-5%, nothing major.

Screenshot 2024-08-19 at 21 36 20

@Rich-Harris
Copy link
Member Author

Since the performance characteristics look okay, I've expanded on this in #12916

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