开发者

Slow rendering of Partial View

I am rendering a partial View in another view via MVC 3 AJAX. But the rendering is painfully slow. for 1350 records it takes about 5-开发者_C百科8 seconds. I have checked my data & business layers and have not found any issue. The issue seems to be arising when the partial form is being "inserted" in the main view. I am using Razor for the view. Any advice ?


I've found the "painfully slow" part comes from the amount of data pushed to the client, not the 1350 records, as you have found. Consider using techniques to minimize the amount of data being passed over the wire and underlying HTML. JSON could help by using AJAX and building the UI through JavaScript, using a JavaScript library.

OR, instead of JSON, just make an AJAX request to the partial view, and render the partial view asynchronously, which would also give the user more of a richer feel; they can access the page, but have to wait for the 1350 results.

HTH.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜