Sneak Peek: Enhanced ASP.NET Themes DLL Performance

30 October 2009

Another performance enhancement in the DXperience 2009 volume 3 release is the use of the ASPxThemes DLL. Using our custom HTTP handler [1] module, the ASPxThemes DLL will now compress the CSS files along with the scripts and callbacks.

Typically, the ASP.NET theme files are stored in your project’s App_Themes folder. With the DXperience 2009 volume 2 release, you have the advantage of using our ASPxThemes DLL [2] which packs the images and CSS files into one DLL.

Using the ASPxThemes DLL in the DXperience 2009 volume 3 release results in reduced web server traffic because:

  1. Shorter resource URLs:
    • ASPxThemes DLL - '/grid93/DXR.axd?r=1_16' – (22 Characters)
    • App_Themes Folder - 'App_Themes/MyBlackGlass/Web/sprite.png'  - (38 Characters)
  2. The ASPxThemes DLL will now compress the CSS files (v9.3) along with scripts and callbacks (v9.2):

Table 1: Performance of App_Themes Folder vs ASPxThemes DLL    

Recommendation

We’re recommending that you use the ASPxThemes DLL. By default, the pre-packaged themes we provide will already be included in the ASPxThemes DLL. However, if you use custom ASP.NET Themes then put them in the ‘custom theme assembly’ before publishing your web site. And here’s how to do it:

S132599 - Provide a way to use custom ASP.NET Theme with New HTTP Handler for Resources

 

Your Feedback Is Appreciated

Drop me a line below with your thoughts and comments.

 

References:

[1] ASP.NET Performance Improvements in DevExpress 2009 volume 2 by Mehul Harry

[2] Custom ASP.NET Themes And The New ASP.NET Themes DLL by Mehul Harry

 

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/

 

9 comment(s)
Jim Leary

Is there any way for this to work if themes are assigned dynamically? We store each users preferred theme in in their profile.

30 October, 2009
Christopher Todd

I'm a little confused, what is actually new in 9.3? The ASPxThemes DLL stuff was released in 9.2. Are you just enhancing the DLL performance in 9.3?

Just reminds me of an old Archie comic where Archie is adding different parts to his car to improve gas consumption. 10% improvement here, 30% there, 60% here, and 25% there, then Jug Head asks him why he's so gloom and Archie tells him that it now floods.

30 October, 2009
Robert Beaubien

What are the improvements over v9.2.x using the themes dll there?

30 October, 2009
Mehul Harry (DevExpress)

@Jim,

Yes, it should work as long as the files are deployed with the project.

@Christopher and @Robert,

Sorry, wasn't very clear. Update the post but bascially, the DLL will now also compress CSS files and use the shorter urls for the themes files.

30 October, 2009
Chris Walsh [DX-Squad]

The only "issue" is the fact that you're relying on one DLL to farm out the resources.  Sure this is a good idea, but you have to remember that most browsers only allow two connections per domain to download resources, so if you are downloading a multitude of resources you're forced to wait, a way to improve this is add a few sub domains like res1.something.com, res2.something.com etc etc, which essentially point to the same IIS virtual dir.  Not sure how this will work if at all with the Custom HTTP Handler written by DX.

But good work guys :)

30 October, 2009
uberVU - social comments

This post was mentioned on Twitter by jrguay: Sneak Peek: Enhanced ASP.NET Themes DLL Performance: Another performance enhancement in the D.. http://bit.ly/2Le7LR (via @devexpress)

31 October, 2009
Peter Thorpe

You say it's possible to change theme dynamically. I haven't been able to achieve this, could we have an example.

I currently use the method here where all pages derive from a base page allowing the changing of themes from a list.

www.devexpress.com/.../E1342.aspx

But this uses the individual app themes files.

31 October, 2009
Sneak Peek: Enhanced ASP.NET Themes DLL Performance - The ASPx …

Pingback from  Sneak Peek: Enhanced ASP.NET Themes DLL Performance - The ASPx …

31 October, 2009
Sneak Peek: Enhanced ASP.NET Themes DLL Performance - The ASPx …

Pingback from  Sneak Peek: Enhanced ASP.NET Themes DLL Performance - The ASPx …

1 November, 2009

Please login or register to post comments.