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

It is somehow slower than synckit and can be faster #2

Open
JounQin opened this issue Jul 10, 2021 · 1 comment
Open

It is somehow slower than synckit and can be faster #2

JounQin opened this issue Jul 10, 2021 · 1 comment

Comments

@JounQin
Copy link

JounQin commented Jul 10, 2021

I'm developing a similar util module inspired by this package and esbuild.

It is mainly using the structure from esbuild now with MessageChannel, and I run a benchmark https://github.com/rx-ts/synckit/blob/main/benchmarks/benchmark.txt, it seems much slower during runtime. I was thinking sync-threads would be much faster because it's using v8 serialization inside.

Maybe there are a few reasons:

  1. synckit creates the worker in top createSyncFn and reuse it every time, that's why the load time is much slower that sync-threads
  2. synckit use cache to speed up same file (not benchmarked)
  3. Maybe the serialization has been improved without v8 (not confirmed, I'm not familiar with v8)
@onigoetz
Copy link

Hi @JounQin, you are right, this package can be made much faster and I made a PR for it : #3

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

No branches or pull requests

2 participants