Loading delayed when PTHREAD_POOL_SIZE is set #18195
Replies: 5 comments 9 replies
-
Yes, each worker/thread does need to load all of the JS code and all of the wasm code. Basically each thread needs to be complete copy of the program, much like it would be when you create a thread on a native platform. |
Beta Was this translation helpful? Give feedback.
-
Do you really need to set (As long as you return to event loop in your program before communicating with new threads you shouldn't need to use a thread pool at all). |
Beta Was this translation helpful? Give feedback.
-
No it doesn't need to use all of them right away. |
Beta Was this translation helpful? Give feedback.
-
about |
Beta Was this translation helpful? Give feedback.
-
Actually, with PTHREAD_POOL_SIZE=60 the loading time is very fast for a real domain Server. |
Beta Was this translation helpful? Give feedback.
-
I have a delay in loading when linking with PTHREAD_POOL_SIZE=60.
as debugging in Chrome DevTools, I see that for every thread, two files are loaded:
I would glad to know why the main JS should be loaded for every worker.js.
is there any optimization that I can do ?
Beta Was this translation helpful? Give feedback.
All reactions