performance issue in MVC 5 application RRS feed

  • Question

  • User-2009437049 posted


    We developed an MVC 5 application in almost 2.5 years.

    Initially , it was working good but as long as data was being increased. Application is stuck now.

    We are trying to find the main reason but still couldn't be 100 percent successful. 

    we are curious about why it is being slower.

    Server detail are:

    Windows Server 2012

    Sql server 2014 Web Edition

    RAM  -- 128 GB

    Intel Xeon -- 10 Cores.

    Disk I/O -- Not SSD  (Disk I/O starts from 0 to 100% and very frequently 100%)

    We are minimizing the CSS and JS plugins.

    We are optimizing the sql queires and front-end logic (client side and server side)

    We have deployed the MVC 5 with pre-compiled resource and release mode.

    We  have used caching with some views but caching works better only  for some  action views not all. In some cases, views are taking more time than actual time.

    We  have almost done many thing for increasing the performance yet 20/30 % performance was increased.

    One more thing is Our database size is not too large and we are picking just one page (25 records). Size is 600MB to 700MB with 10 multiple physical files.

    We have remove the Application request event from global.asax. Web.config only has debug = false.

    Sometimes , Redirect takes 9 seconds and sometime 36 seconds.

    Why ?

    Database logic is simple and front-end as well.

    I placed the  same release on another server. Speed issue seems to be equal or similar.

    I tried same logic with plain html and jquery and it worked like a bullet but same view is taking 5 to 9 seconds. This was a very simple view.

    Can anyone suggest us something better?


    Wednesday, October 23, 2019 7:27 PM

All replies

  • User475983607 posted

    The usual culprit is poorly designed or missing table indexes.  Next is poor performing quires.  Next, is rendering.  

    Where is the majority of the time spent?  Fetching records?  Rendering the UI?  The first step, IMHO, if figuring out where the bottle neck is then looking closer at the actual area affecting performance.

    Wednesday, October 23, 2019 8:07 PM
  • User-17257777 posted

    Hi fdfdfdf,

    Poor performance may be related to many aspects, while the first thing you should do is finding out which part takes long time. You can use the Network and Performance two panels of the f12 development tool to monitor

    The Network panel is used to monitor, inspect and profile the requests and responses sent over the wire. With it you can:

    • Browse all the resource requests made by the page
    • Measure the load time of your site
    • Inspect the headers, message bodies, parameters, and cookies exchanged between your page and the network
    • Identify the network events causing bottlenecks in the load time of your site


    The Performance panel offers tools for profiling and analyzing the responsiveness of your UI during the course of user interaction. With it, you can:

    • Measure execution times of the various components of your page
    • Drill down to where you're spending the most CPU cycles to run your page and the resulting visual effect for your users
    • Get a step-by-step breakdown of the processes consuming page execution time
    • Walk your JavaScript call stacks to identify costly operations


    Best Regards,

    Jiadong Meng

    Thursday, October 24, 2019 6:29 AM
  • User-2009437049 posted

    thank you mgebhard and jiadongam.

    Ok i try to check the indexes. Yes i think rendering the UI and redirects  sometimes response quickly and sometime very late.

    In some case, when i run the query in sql editor . it return the results quickly 

    Multiple consecutive Async (true) Ajax calls are initiated which are getting the views and other data. (almost 10 or more) 

    I am inspecting through browser network tab.

    Why redirects takes unexpected time to load ?

    Sometime quicker and sometimes longer.

    One thing, i want to ask 

    If i load a view  through ajax async (true) and server action only have a ActionResult return type.

    Can it be a cause to slower the application ?

    Another interesting thing is that a simple view is taking 5 to 9 seconds to load. view size in 24 to 36KB.

    that view doesn't have any relation with database.

    Thursday, October 24, 2019 5:23 PM
  • User-17257777 posted

    Hi fdfdfdf,

    Set async as true will not slower the application, instead, in most cases asynchronous will make it faster. Processing your request asynchronously avoids the delay while the retrieval from the server takes place because your visitor can continue to interact with the web page, the requested information will be processed in the background and the response will update the page as and when it arrives.

    As for why a simple page has to be loaded for such a long time, I still suggest you use the tool to figure it out, it may be related to the Server, UI rendering and etc. as said above. What we said here are just our guess, you should first find the problem, then we can help you solve it.

    Best Regards,

    Jiadong Meng

    Friday, October 25, 2019 9:28 AM