We're trying to squeeze as much performance out of our single page application written in asp.net mvc. The current layout is:
Our major performance issues seem to be that the SPA side of things is quite chatty with the Server to retrieve JS and HTML files required for the current pages and also to push and pull data from the SQL DB via mvc WebApi.
Im wanting to somewhat change up our architecture to limit the chattiness between the client browser and the server. I'm reading all about server side rendering but it seems like it would be a major rewrite to put that into a mature application at this point.
Just wondering if anyone had any advice on methodologies to approach this issue and any libraries to checkout?
I'm assuming in this answer that your performance problem is the usability kind: The user feels the application is slow. If so you should be aware that what people actually remember is not, was the application slow, so much as was it difficult to complete the task they were trying to do (sorry I can't immediately find the source for that research/conclusion).
But anway. I would start by distinguishing out two quite different things:
The static files problem is not a problem. It should not involve any architectural changes, but is a learning curve. You address it with WebGrease (or alternatives) and/or by using BundleConfig . Both of these are part of the out-of-the-box aspnet template projects.
The chattiness of api calls is very different. Resolving that is a case of reviewing your service & application design. I would probably
Finally, I come back to my opening point that it may be all about UX design not under-the-hood performance. Can a user complete the task fairly easily? Have any actual users told you it's slow, or are you just assuming it is? Sit with a user and watch how they work; what is actually bugging them?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.