Monday, 24 December 2012

MVC website performance

Faced with the challenge to improve the performance of our ASP MVC3 website, here is what I did:
  1. Added log messages in the controller and service layer calls - Since we use log4net for logging, this means simply adding Logger.Debug messages in the required methods. I made sure that the log took the time in millisecs, as seconds wasn't good enough! http://logging.apache.org/log4net/
  2. IE9 has a very useful addition to its Developer tools (F12), which is an additional tab for network monitoring. http://msdn.microsoft.com/en-gb/library/ie/gg589507(v=vs.85).aspx
This helped me realise that the performance bottleneck was not the database or business logic, but the response time - which meant HTML/Javascript sent to the client was enormous. One step which made a massive difference in reducing the response time was to enable HTTP dynamic compression in IIS Manager on our web server.
http://technet.microsoft.com/en-us/library/cc753681(v=ws.10).aspx
 

No comments:

Post a Comment