I'm developing high load solution with final version of asp.net mvc. Recently our team noticed, that most of the time that takes a server to response to client is devoted to page rendering. Simple time-schedule looks like this:
Page start - 1.8608363s
Render module 1140/Modules/Owners start - 1.86859s
Render module 1140/Modules/Owners Complete - 1.9081751s
Render module 829/Modules/Links start - 1.9081788s
Render module 829/Modules/Links Complete - 2.3380648s
Render module 1036/Modules/Advertisement start - 2.3459101s
Render module 1036/Modules/Advertisement Complete - 2.3482298s
Render module 1110/Modules/Goodies start - 2.3482322s
Render module 1110/Modules/Goodies Complete - 2.6300744s
Render module 1004/Modules/TopicLinks start - 2.6300784s
Render module 1004/Modules/TopicLinks Complete - 3.8852529s
Render module 1048/Modules/News start - 3.8927697s
Render module 1048/Modules/News Complete - 4.4958795s
Render module 1128/Modules/SuggestedLinks start - 4.4958832s
Render module 1128/Modules/SuggestedLinks Complete - 4.5704227s
Page end - 4.5711193s
TopicMainMenuPages start - 4.5717661s
TopicMainMenuPages End - 4.571974s
Render Finished - 4.6185852s
What could be a reason for such a slow rendering? Is that for oftentimes using of partial render during single request?
Make sure the
compilation debug="false"
in yourweb.config
and build your application in Release mode. This will allow the MVC framework to cache the paths that it resolves for your partial views.See the article here for more info.
Kindness,
Dan