Jonas Stawski

Everything .NET and More

Component Art Web.UI Client Script Deployment

I was doing some research on Component Art's Web.UI suite and I came across this post by Milos. Basically Component Art added a new feature in the 2007.2 version to allow all the client script references to be downloaded all at once. Why? Because the roundtrip during the request for the scripts adds a lot of overhead. The problem with this is that now all the Web.UI scripts are downloaded with one big request, which according to Milos is about 300K. They resolve the size issue by allowing you to specify which scripts to get based on your needs. So if you only use the menu, then you would only get the scripts necessary for the menu and thus avoiding the extra overhead. Please note this is an application level change so if you're going to specify which scripts to get then you must select all the controls used on your application.

Milos also explains how to set your app to use the new feature. I tried it out and of course it didn't work for me. Why? Because I'm running IIS 7 under Windows Vista. What's the difference? IIS 7 uses the HTTP Handlers in another section of the web.config, so if you're using Windows Vista add the HTTP Handler under <systen.webServer><handlers> section. And if you're like me where your production server is running IIS 6, then add the handler in both sections.

So I decided to give it a shot to see if there was any performance increase so I fired up FireFox and FireBug and inspected the network traffic. Without the new feature turned on I had 22 requests with a total of 314 KB worth of data and it took 159 ms.

image

The results with the new feature turned on are very promising. I'm only bringing down the scripts for the Menu, Grid, and Upload controls. The request goes down to 137 ms and there are only 11 requests (half of what it used to be) with a total of 101 KB.

image

Please note that on the first screen shot (feature turned off) there 11 requests to WebResource.axd. This is the handler used by ASP.NET Ajax and the Web.UI utilizes the ScriptManager to register the ComponentArt scripts. In the second screen shot (feature turned on) there is only one request to ComponentArtScript.axd which weights 73 KB in total and that request is the one that gets the script files.

So not only will your application respond faster, but you will also save a ton on bandwidth.

This is a very cool implementation from the guys at Component Art and I think they are doing a great job with their controls, keep up the good work!

Add comment

biuquote
Loading