ASP.NET Performance Improvements in DevExpress 2009 volume 2

ASP.NET Team Blog
20 July 2009

DevExpress ASP.NET Performance: Speed with custom HTTP HandlerI'm thrilled to announce the new performance enhancements of the upcoming DevExpress ASP.NET controls. Our ASP.NET controls just got a major performance boost from a few changes -- in fact, several of these were prompted by your requests.

Read on for more details…

New HTTP Handler for Resources

This is the biggest reason for the performance boost. Instead of the using standard HTTP Resource handler provided by ASP.NET, to get resources from the server, we've implemented our own custom HTTP handler which increases performance.

Basically, the DevExpress HTTP handler changes how the compressed scripts and CSS files are transmitted from the web server to your browser. This makes round-trips to the server much faster. And it also reduces the HTML code size by providing shorter links for the resource URLs!

Another performance advantage comes from the result of smarter script transmission to the client-side. Previously, script files were batched together and sent to the client even if all the files weren’t necessary. With the new custom HTTP handler:

  1. Our ASP.NET controls can analyze which scripts are necessary for each request
  2. Join those scripts dynamically into a single batch
  3. And send them to the client-side

Your websites will get an instant boost by using the DXperience ASP.NET 2009 volume 2 release.

How fast?

We ran a performance comparison between the 2009 volume 1 and the upcoming 2009 volume 2 releases. Using a customer reported scenario, we created one ASPX test page and added one ASPxGridView, two ASPxButtons, three ASPxComboBoxes  and three ASPxCheckBoxes.

Here’s the summary of the test results:

  1. The new resource handler compresses script- and CSS-files. Since these are text files, the compression for them is very good (about 5 times, i.e. the compressed size is 20% of the original size). Check out the Fiddler results below for more information.
  2. Because the new resource/ HTTP handler in the 2009 volume 2 release makes resource URLs shorter - it reduced the overall HTML render size of the test page by about 12-13%. Here’s a sample of the difference:

    - 2009 volume 1 (standard handler - long URLs):
    Code Snippet
    1. <head><link rel="stylesheet" type="text/css" href="/grid91/WebResource.axd?d=6pSNzQ1UD-xbX4brCyMRS5Aety-hEChDGMAZMfvfsvLyvX8p0-PWSTlzWq8GzSpz4hemwcf0CWYmNvrCkeu_3Q2&amp;t=633784297566166839" />
    2. < link rel="stylesheet" type="text/css" href="/grid91/WebResource.axd?d=6pSNzQ1UD-xbX4brCyMRS9SgRpCgVZy9dht7IfwJ8wGam6IzSaAyQWZHZi3WhzChkO6yhP_zVSMDMu0nVhHKcKs7-MXEoaluDT3hQ7Ch9Fo1&amp;t=633784297644423039" />
    3. < link rel="stylesheet" type="text/css" href="/grid91/WebResource.axd?d=6pSNzQ1UD-xbX4brCyMRS0bFPfhKDiNLdRIXGSYh0yAICuinqxp3lSp2F8u9TT_vta4GuI5olw_Gsex686sFbRsMqUUqUpyNJqrzG7tTpe41&amp;t=633784297596469639" />


    - 2009 vol 2 (our resource handler - short URLs):
    Code Snippet
    1. <head><link rel="stylesheet" type="text/css" href="/grid92/DXR.axd?r=2_2,3_22,1_69" />


    This feature is optional so to activate it, add the following key to your web.config’s appSetting section (DXEnableResourceMerging):

    Code Snippet
    1.     <appSettings>
    2.         < add key="DXEnableResourceMerging" value="True" />
    3.     </ appSettings>

  3. Another new performance feature is the ‘combine all scripts in one file (from different assemblies) and merge all CSS-files in one file’. This feature helps reduce the number of requests to the server.

    Script-files (and CSS) are compressed by the server before posting to the client. The reduced size is about 20% of original size (i.e., reducing it by 4-5 times the original size).

    To test, we launched the Fiddler2 tool and got the following impressive results:

    2009 volume 1

     
    Request Count: 31
    Bytes Sent: 14,561
    Bytes Received: 788,598
    Sequence (clock) time: 00:00:00.5935258
    text/ Java Script: 644,219
    application/x- Java Script: 20,794
    US West Coast (DSL - 30KB/sec)  
    Round trip cost: 3,10s
    Elapsed Time: 29,10s

     

    2009 volume 2

     
    Request Count: 16
    Bytes Sent: 5,820
    Bytes Received: 220,217
    Sequence (clock) time: 00:00:00.2967629
    text / Java Script: 130,910
    application / x- Java Script: 20,794
    US West Coast (DSL - 30KB/sec)  
    Round trip cost: 1,60s
    Elapsed Time: 8,60s

    Traffic is reduced by about 3.6 times (220,217 KB for 2009 volume 2 VS 788,598 KB for 2009 volume 1).

    Scripts are reduced by about 5 times their original size (130,910 KB for 2009 volume 2 VS 644,219 KB for 2009 volume 1).

The reduced amount of traffic means faster page loads for your websites (especially for slow connections). These enhancements are part of our dedication to bring you features, quality and performance in the DXperience Subscription.

DXperience? What's That?

DXperience is the .NET developer's secret weapon. Get full access to a complete suite of professional components that let you instantly drop in new features, designer styles and fast performance for your applications. Try a fully-functional version of DXperience for free now: http://www.devexpress.com/Downloads/NET/

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.