-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Use worker_threads
#9
Comments
Yeah, I've been thinking about moving to |
child_process
is much slower than worker_threads
worker_threads
Can I recommend user's to use |
I plan on supporting |
Your benchmark is flawed. You should run a heavy operation in the worker to actually test it, not just a lightweight task. Also, the task you are running in the worker ( |
That's great, I would follow your changes then. |
@sindresorhus I came here wondering what the advantages are of this over synckit. synckit seems well thought, fairly feature-rich out and widely used - do you think it's worth maintaining this rival at this point? Is there something missing from synckit that make-synchronous does better, or will do better? This is a genuine question - it's often hard to tell what the tradeoffs of various libraries are, and maintainers tend to know best. |
@mmkal This executes in a subprocess which has some benefits:
Yes, it's slower to launch a subprocess, but that only matters if you use it for short-running tasks. For long-running intensive tasks, the difference is neglible. |
Or if your task needs to be run many times, there will be huge difference too. |
See https://github.com/rx-ts/synckit/blob/perf/make-synchronous/benchmarks/benchmark.txt
It's about 300x slower.
The text was updated successfully, but these errors were encountered: