I’m looking to implement something similar to the Html.Action helper, but instead of using the controller and action names, I want to provide the RouteName and route parameters.
In our project, the RouteTable is very large (around 7500 routes), and every call to Url.Action or Html.Action takes around 600ms just to find the correct route in the RouteTable.
We’ve already moved from Url.Action to Url.RouteUrl to avoid the overhead of querying the entire RouteTable, but now I need to know how to do something similar with Html.Action.
Is there a way to retrieve the action’s HTML using the RouteName directly, without having to go through the entire RouteTable lookup for every request?
Thanks for your help!