R
R
Ruslan2017-11-19 11:48:38
ASP.NET
Ruslan, 2017-11-19 11:48:38

How can an asp.net Action be optimized with many Html.RenderAction calls?

Hello. There is the following situation:
There is a method (Action) in the asp.net controller that generates a model, on the basis of which an html page is generated using the view.
The view calls several Html.RenderActions to insert some of the generated parts into the page.
The problem is that RenderAction calls are made after the main Action has been executed, i.e. it cannot be parallelized.
Solutions that immediately come to mind:
1. generate models for the views that are now added via RenderAction in the main Action in parallel with the main code, add them to the main model and render using RenderPartial
2. On the client side, make ajax calls to those Actions that are currently called via RenderAction (but this will speed up the user receiving the page, but will not speed up receiving the entire content as a whole)
Are there any other solutions for parallelizing and optimizing such a web page ?
Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question