Suppose you have a task on your webapp that requires maximum performance. The task is very parallelizable: you can divide it into, say, 500 independent sub-tasks. What is the best solution?
- (A) Just create 500 web workers.
- (B) Create a small number of t web workers and make them consume 500 tasks.
If (B) is the way, how can you determine (if possible, empirically) the best value for t ? Is there any library to solve this particular problem?
source
share