HTML, the markup language of the internet, is undergoing a major revision that aims to create a language better suited to today’s web applications. HTML5 is edging towards completion, and many of the features are considered stable enough for immediate use (where supported by browsers).
One of the features that caught my attention was the introduction of web workers, which will be used to run scripts in the background. While workers do not support highly granular tasks, they are recommended for tasks with a high startup performance cost and a high per-instance memory cost. They enable these tasks to continue without interruption from user interface events, and without making the user interface appear to be unresponsive.
The draft API includes several example implementations, ranging from a simple background number-cruncher, through the use of workers for updating client-side databases in the background, to the delegation of a large workload to ten separate workers. This latter case, in particular, could make it easier to exploit the CPU’s full potential on computationally intensive tasks. Although the examples are concerned mostly with mathematical calculations, this approach could equally be applied to graphics calculations. Google recently demonstrated the power of the cloud, but this approach won’t always be available or appropriate for developers, who still have a lot of untapped desktop PC power.