2 ms·
Web workers offer several benefits: 1) UI isn't locked up by long running tasks; 2) Potential performance improvement by running multiple processes at once (p
by Jtsummers 10y ago
Web workers offer several benefits:
1) UI isn't locked up by long running tasks;
2) Potential performance improvement by running multiple processes at once (parallelization);
3) Potential design improvements by decomposing the problem into a CSP-like design (which may or may not relate back to (2)).
(2) is really not the purpose though, it's just a potential benefit. golang, for instance, doesn't give us inherently better performance by use of goroutines. What it gives us is better design and separation of execution blocks so that they can run concurrently. Better performance is just a perk when things can run in parallel.