locked
MVC 5 application speed issue. RRS feed

  • Question

  • User-234441352 posted
    Hi,
    We have an application in MVC 5.
    One process is a bit long to create orders.
    Application works fine on my local machine but performance speed is getting low day by day.
    In that create order process, there are many partial views which are being loaded through ajax.

    Now when we try to go for step 3 to more, application don't show anything until the Ajax call is completed.
    Consecutive Ajax call doesn't stuck the UI but response is slow and it doesn't give a good sense to customers.

    Back-end process seems to be fine.

    Server specs seems to be fine with 128GB RAM with multi core processors.

    But why web site seems to be slow on internet?

    What factors should be considered?
    Thank you

    Saturday, August 10, 2019 1:55 PM

Answers

  • User1520731567 posted

    Hi mehmoodahmed...

    Performance issues are difficult to analyze because they are not in a real environment.

    I suggest you could follow the below points:

    • from source data:
    1. Optimize SQL algorithm
    2. Try to avoid transferring large amounts of data at once, and you can transfer them in batches
    • from code:
    1. Consider using a cache
    2. Optimize query statements, lazy loading, use stored procedures

    Finally,you could check performance issues with F12 developer tools.

    Best Regards.

    Yuki Tao

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 12, 2019 5:57 AM
  • User-2054057000 posted

    Hi yuki,
    Thank you.
    How should I manage the multiple consecutive Ajax calls?
    I think, may be problem is here

    First make sure the AJAX calls are slowing your web page. You can just keep 1 and comment out the others and see with effect they cause. It's just 1 way of finding out the problem.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 19, 2019 4:08 PM
  • User-474980206 posted

    it sounds as you add data your performance is declining. check the database design / indexes / queries, also how much data is returned (is the whole database table returned to MVC then filtered).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 19, 2019 4:30 PM

All replies

  • User1520731567 posted

    Hi mehmoodahmed...

    Performance issues are difficult to analyze because they are not in a real environment.

    I suggest you could follow the below points:

    • from source data:
    1. Optimize SQL algorithm
    2. Try to avoid transferring large amounts of data at once, and you can transfer them in batches
    • from code:
    1. Consider using a cache
    2. Optimize query statements, lazy loading, use stored procedures

    Finally,you could check performance issues with F12 developer tools.

    Best Regards.

    Yuki Tao

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 12, 2019 5:57 AM
  • User-234441352 posted
    Hi yuki,
    Thank you.
    How should I manage the multiple consecutive Ajax calls?
    I think, may be problem is here
    Friday, August 16, 2019 10:12 AM
  • User-2054057000 posted

    Hi yuki,
    Thank you.
    How should I manage the multiple consecutive Ajax calls?
    I think, may be problem is here

    First make sure the AJAX calls are slowing your web page. You can just keep 1 and comment out the others and see with effect they cause. It's just 1 way of finding out the problem.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 19, 2019 4:08 PM
  • User-474980206 posted

    it sounds as you add data your performance is declining. check the database design / indexes / queries, also how much data is returned (is the whole database table returned to MVC then filtered).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 19, 2019 4:30 PM
  • User-234441352 posted

    thank you yogi and bruce,

    I tried to optimize the code but it seems like there is some issue which needs to be checked.

    May be, still there would be some database table returned to MVC and then filtered.

    It can be possible, i need to check thoroughly.

    Yes Yogi, i need to check the ajax one by one. 

    thank you both.

    Thursday, August 22, 2019 12:11 AM