Microsoft recently released Doloto, a tool that splits your code and load it when necessary. It unfortunately only runs on the .NET Framework 3.5. Which means I will probably never try this tool as I hate the .net web framework.But it looks good on paper.

“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.”

Download it here.