SquishIt performance problem with AsCached()

110 views
Skip to first unread message

Chaitanya Kale

unread,
Jan 21, 2016, 3:33:09 PM1/21/16
to SquishIt
Hi,

I am using SquishIt to bundle CSS and JavaScripts for my application developed in MVC 4.0. It is implemented same way as described SquishIt without the file system.
While working on performance tuning, I found that for each Http request going to server, transfers bundle back to client (in Mozilla debugger Network section it shows ms and transferd data size). 

I guess when using .Render method in layout views, it was caching in http and not requesting every http request.
Is there any way, I can avoid data transfer for each request? and also compress bundle to reduce size of it?

Regards,
Chaitanya.

Alex Ullrich

unread,
Jan 25, 2016, 2:26:41 PM1/25/16
to SquishIt
Not sure what version of IIS you have but you may be able to use the dynamic compression module to compress the output of your AssetController.

How did you find that the bundle is requested on each page load?  Are you using a hard refresh that would force re-retrieval of any cached resources?

What are the headers for the response coming out of your asset controller?  You should have CacheControl:max-age set to 365 days worth of seconds, if you followed the example verbatim.  If you aren't setting max age, you need to.

Odds are if you were previously using the normal Render method, you were rendering to the file system and the result was served as static content using any policy you have configured on the server.  You will need to make sure the Asset controller uses a similar policy.
Reply all
Reply to author
Forward
0 new messages