WebResource Embedded Resource Files Caching

August 12, 2008

WebResource Embedded Resource Files Caching


Yesterday, I got a mission to WebResource Embedded Resource Files Caching
check why some web forms in
my current project have poor
performance. After some research
with the Fiddler tool I found that
the WebResource.axd files are
reloaded in every page request.
These files are used for script callbacks by the Ajax extensions. The thing about
those files are that they are very big and therefore consume a lot of bandwidth
and make the page load very slow. Checking the issue further I noticed that the
files were sent with the Cache-Control: private header therefore they were never
cached. The issue happens because when an assembly is compiled in debug mode
the caching is made private which means that no caching will happen. To solve the
problem just compile the assembly in release mode which will result in a public
Cache-Control header. Because I’m currently not a member in the team that update 
the production version I went to check whether the system is compiled in release mode
before it goes to production. Guess what was the answer…
Yep, no release compilation and a penalty of performance to our system.
The issue is currently been checked and hopefully the next version will be in release
mode.
For further reading in the subject I recommend Rick Strahl’s post.


Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

3 comments

  1. aliklAugust 12, 2008 ב 11:26

    Good stuff, Gil, good stuff you share.

    This is SO FUNNY!!!
    I just posted the following article on ACE blog that calls out this one and the other cases too. Check it out here:

    http://blogs.msdn.com/ace_team/archive/2008/08/11/asp-net-performance-high-cpu-utilization-case-studies-and-solutions.aspx

    alikl

    Reply
  2. Gil FinkAugust 12, 2008 ב 13:44

    Thanks Alik,
    Read the post on the ACE blog :-) – good and recommended stuff

    Reply
  3. kolbisAugust 13, 2008 ב 5:01

    Thanks Gil,
    Good one!

    Reply