The Ashes
Doloto, the JavaScript optimizer, released by Microsoft Research
We posted on Doloto, the Microsoft Research project to help optimize JavaScript via code splitting. Ben Livshits and his team have now released the service:
Doloto is an Ajax application optimization tool, especially useful for large and complex Web 2.0 applications that contain a lot of code, such as Bing Maps, Hotmail, etc. Doloto analyzes AJAX application workloads and automatically performs code splitting of existing large Web 2.0 applications. After being processed by Doloto, an application will initially transfer only the portion of code necessary for application initialization.
The rest of the application’s code is replaced by short stubs—their actual function code is transferred lazily in the background or, at the latest, on-demand on first execution. Since code download is interleaved with application execution, users can start interacting with the Web application much sooner, without waiting for the code that implements extra, unused features.
Doloto does very interesting work on your JavaScript. It rewrites the code and builds clusters:
and does function splitting and lazy loading:
What about the space savings? The team claims:
Doloto reduced the amount of initial downloaded JavaScript code by over 40%, or hundreds of kilobytes resulting in startup often faster by 30-40%, depending on network conditions.
Unsurprisingly, Steve Souders is a fan 🙂
No Comments