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

Don't store JsValue in ListenerProduct #75

Merged
merged 4 commits into from
Apr 15, 2023
Merged

Conversation

maciejhirsz
Copy link
Owner

@maciejhirsz maciejhirsz commented Apr 15, 2023

  • No need to store the JsValue for a closure, it's fine to just pass it into the compiled JS code by value.
  • No need to update bound event listeners if the closure they are created from is zero-sized.

This results in a minor reduction in the Wasm file (TodoMVC goes from 35173 bytes to 34986 bytes, uncompressed).

@maciejhirsz maciejhirsz merged commit 39858b3 into master Apr 15, 2023
3 checks passed
@maciejhirsz maciejhirsz deleted the no-jsvalue-closures branch April 15, 2023 16:58
@maciejhirsz maciejhirsz mentioned this pull request Apr 15, 2023
10 tasks
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

1 participant