News for hackers. Stuff that matters.
Re:Slowloris: high-performance HTML5 UIs by pak on Monday September 10, 2012 @09:17AM (#4499574)
ChromoZoom (http://chromozoom.org) uses web workers to offload custom track drawing to a background thread. If all the data processing were done on the main thread, the UI would stall. However, unlike this library, I don't rely on passing all the JS to an eval() on the worker thread; I have the worker and the main thread load the same code, and refer to the methods by name. This makes it easier and more organized, IMO, when dropping back to non-web-worker operation.

https://github.com/rothlab/chromozoom/blob/master/js/CustomT...

and the top 135 lines of

https://github.com/rothlab/chromozoom/blob/master/js/CustomT...

show how we do it.

There are no comments on this comment yet.