MS Doloto: Ajax application download optimization

Published on September 09, 2009

MS Doloto: Ajax application download optimization

    In MSDN DevLabs posted a program Doloto designed to optimize any Ajax applications. According to its name, Doloto cuts off the code to the required minimum, so that the application loads faster for the client and starts to execute faster.

    The program analyzes the source and selects that piece of JavaScript code that is directly needed to initialize the program. Profiling of functions is performed on the client machine through the local proxy server http: // localhost: 8888 during the execution of the Ajax application in the browser. In this case, all "unnecessary" functions are marked with labels (timestamps). Directly on the client machine, optimized Ajax application code is generated in which the "unnecessary" functions are replaced with small stubs. This code will then be loaded in the background, or as necessary, after the initialization of the main script. Optimized code is stored on the hard disk of the client computer. Thus, it is possible to optimize other people's applications even without having access to their servers, see Doloto FAQ .

    The program was tested on popular Ajax interfaces and got an impressive result.

    With default settings, it compresses the Ajax code on average by 46%, and after proper configuration - by 66%. Ajax scripts from Google Docs and Google Maps are compressed by Microsoft program at 80-90%. Even if the optimization is not so significant, the download speed and the beginning of the execution of Ajax programs are still accelerated by 30-40%, the developers say , depending on the parameters of the network connection.