Sorry, but your browser doesn't support the HTML5 webworkers API. Please try the app on an other browser (Internet Explorer 10+, Firefox 3.5+, Opera 10.60+, Chrome 3+, Safari 4+)
This small app tests how HTML5 web workers can help us to maintain the responsiveness of the page during a quite intensive background computation. The app computes the sum of the natural numbers from 1 to 3333333333 (you can check the result in the console of your browser's developer tools).
It is quite interesting but there is a huge difference between browsers as regards handling this computational task with and without web worker. In my experience the durations of computations were the following:
|Browser||Duration with worker (seconds)||Duration without worker (seconds)|
|Firefox 32.0||4-7||4-70 (!)|
|IE 10||40-50 (!)||50-60 (!)|
Such a computation can consideralibly block the responsiveness of the page. One of the solution of avoiding this blocking effect is using web workers.
click to test responsiveness
Time of computation with web worker:
Time of computation without web worker:
You can check the project on Github.