[ASP.NET MVC(jQuery)]如何加快操作? [英] [ASP.NET MVC (jQuery)] How to speed up operation?
问题描述
一旦我从下拉列表中选择值,下面的代码就会调用并将div id中的部分视图加载为'result'。
但是当数据更多时它需要更多时间来加载div。如何优化它或如何加快操作请有人告诉我?
动作名称'GetActionDetails'返回局部视图。
if(selectedVal!="" || selectedVal!= null){
$('#result')。load('@ Url .Action(" GetActionDetails",new {controller =" WFAction"})',{DefinationId:selectedVal});
}
你好dvaibhav,
如果你想改进实体框架的表现,我建议你可以阅读以下文章。
- 1 。冷与热查询执行
- 2 。实体框架中的缓存
- 3 。自动编译的查询
- 4 。 NoTracking查询
- 5 。查询执行选项
- 6 。设计时性能注意事项
- 7 。加载相关实体
- 8 。其他注意事项
- 9 。调查绩效
- 10 。附录
https:// msdn.microsoft.com/en-sg/data/hh949853.aspx
祝你好运,
Cole Wu
As soon as I select value from dropdown list bases on that following code will call and partial view loads in div id as 'result'.
But when data is more it requires more time to load div. How to optimize it or how to speed up operation please can anyone tell me?
Action name 'GetActionDetails' returns the partial view.
if (selectedVal != "" || selectedVal != null) { $('#result').load('@Url.Action("GetActionDetails", new { controller = "WFAction" })', { DefinationId: selectedVal }); }
Hi dvaibhav,
If you want to improve the perform of entity framework, I would suggest that you could read the following article.
- 1. Cold vs. Warm Query Execution
- 2. Caching in the Entity Framework
- 3. Autocompiled Queries
- 4. NoTracking Queries
- 5. Query Execution Options
- 6. Design time performance considerations
- 7. Loading Related Entities
- 8. Other Considerations
- 9. Investigating Performance
- 10. Appendix
https://msdn.microsoft.com/en-sg/data/hh949853.aspx
Best regards,
Cole Wu
这篇关于[ASP.NET MVC(jQuery)]如何加快操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!