how to improve performance of ASP.NET MVC application?


I would like to know methods to improve performance of asp.net MVC web application? To get better score on Google Page Insights

Thank you


Asked by:- jaiprakash
1
: 354 At:- 6/16/2017 1:36:54 PM
asp.net MVC IIS performance






1 Answers
profileImage Answered by:- vikas_jk

There are several ways to improve the performance of your asp.net MVC web-application:

  1. Caching:
    You should use caching for the images/scripts/CSS etc which will help you improve Page insight score, this is also said by Google, check https://qawithexperts.com/article/asp.net/how-to-enable-caching-in-iis/24

    Cache not-prone-to-change content using OutputCacheAttribute to save unnecessary and action executions.

    Use Etags.
  2. Use of Tools to check optimization Issues like
    YSlow: To get front end issue
    DotTrace: To check back discover memory leaks and performance problems in your application
  3. Use IQueryable Instead of List
  4. CheckNHibernate second level cache
  5. Remove extra View Engines:
    Add following code in your Global.asax Application_start to remove extra View engines if you are using only (.cshtml pages)
    // Removing all the view engines
    ViewEngines.Engines.Clear();
    
    //Add Razor Engine (which we are using)
    ViewEngines.Engines.Add(new RazorViewEngine());?
  6. Add gzip (HTTP compression) and static cache in your web.config 
    <system.webServer> 
    <urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true"/> 
    </system.webServer>?
  7. Bundle and Minify JS/CSS
  8. Try to load partial view's using Ajax, so that page loading takes small loading time.
  9. Use Asynchronous Controllers to implement actions that depend on external resources processing.
  10. Use stored procedures whenever possible.
1
At:- 6/16/2017 4:11:14 PM Updated at:- 6/16/2017 4:13:44 PM
good answer, I will try all these optimizations methods 0
By : jaiprakash - at :- 6/18/2017 6:25:33 AM





Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use
Amazon Deals

Jobs from Indeed