-
Notifications
You must be signed in to change notification settings - Fork 21
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
Value serialization #3158
Value serialization #3158
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
27cefff
to
b924f91
Compare
This is now semi-functional in components storybook, with these caveats:
Still, it's good enough to try and confirm the expected benefits: editing a slow code with autoruns enabled doesn't freeze the editor 🎉 |
On performance: serialization of JSON from the worker back to the main thread is slower than I expected. As an example, in CLI, I don't know yet if it'll be similar in the browser, Node's This is not a blocker, because this example is pathological (we'd have trouble rendering 3000 samplesets in React, anyway), and because unblocked main thread is more valuable, so user experience will be better, but if timings in the browser are similar, then it will cause more CPU overhead. |
Progress since my last comment:
Things to do:
|
…ducer useSimulator refactorings
…ondition in useSimulator hook cleanup
Fixes #2081
Fixes #1198
Not working in browser yet, but CLI is functional, for the value types that I've implemented so far, including lambdas.
This response was generated in a worker thread (
ProjectItem
passes AST+externals to it), serialized by the worker, and deserialized back by the main thread:TODO:
vLambda
calls in serialization — they're bad for deduplicationrun
might be too expensive