AJAX web applications bring a variety of rich user experiences to the web, but often those experiences require downloading a lot of code.  The result is applications that are frustratingly slow to load and taxing to web servers.

Today we are announcing the availability of Doloto on MSDN DevLabs Doloto is a tool that makes pages more responsive by decreasing the initial download size of complex AJAX web applications.

Doloto analyzes AJAX application workloads and automatically performs code splitting of existing large web applications. Doloto enables applications to initially transfer only the portion of client-side JavaScript 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 on-demand on first execution. Since code download is interleaved with application execution, users can start interacting with your web application much sooner without waiting to download code that implements features they’re not currently using.

How it Works

Doloto is a standalone client-side tool.  Its wizard guides you through the following three steps:

 

1.     Doloto profiles your application. Doloto performs profiling by running a local proxy on your machine that intercepts JavaScript files and instruments them to capture timestamps at runtime for every JavaScript function in a browser-independent manner.

2.     Profiling information is used to calculate code coverage and a clustering strategy. This determines which functions are stubbed out and which are not and groups functions into batches which are downloaded together, called clusters.

3.     Doloto rewrites JavaScript code.  It then saves it to disk so that you can upload it to the server. The entire process happens on your machine, without needing access to the server. This way, you can profile and optimize the JavaScript of a any third-party site without special access to their servers. When you are satisfied with Doloto’s results, you can deploy the rewritten files to the server.

 

Show Me Some Results!

In our experiments across a number of AJAX applications and network conditions, Doloto reduced the amount of initial downloaded JavaScript code by over 40%, resulting in startup often faster by 30-40%, depending on network conditions.  The chart below shows savings in the amount of downloaded JavaScript code across a range of popular web sites required for the initial application loading phase.

 

Doloto download savings 

Download and try Doloto today, and share your thoughts and experiences on the project’s forum.

 

Namaste!