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

Performance concern on initialize web worker at every function wrapped by threadify #5

Open
ryancat opened this issue May 8, 2018 · 1 comment

Comments

@ryancat
Copy link

ryancat commented May 8, 2018

This is more like a thought or possible enhancement. From what I understand, web workers are designed to be slow start and long running. I read an article saying it usually takes around 40 ms to initialize a web worker, which is way over 17ms and may cause lagging in UI.

https://hacks.mozilla.org/2015/07/how-fast-are-web-workers/

I think maybe there should be a way to share the worker and create new ones only when necessary.

@flozz
Copy link
Owner

flozz commented May 8, 2018

You are right,

I planned to implement a pool of worker and sending them tasks instead of always starting new workers... but I never done it by lack of time...

Maybe I will implement this when I will have some free time :)

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