Re:Show HN: Sorting 50K Array, HTML5 Web Worker Demo
by Jtsummers on Friday October 28, 2016 @09:36AM
(#12815617)
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.
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.