简体   繁体   English

优化大型ASP.NET应用程序的性能

[英]Optimizing performance of large ASP.NET applications

I'm building a asp.net web application with lots and lots of controls and huge volumes of data. 我正在构建一个包含大量控件和大量数据的asp.net Web应用程序。 My application is very slow and it is taking a large amount of time to load the data into the .net controls like grid, tree view etc. I also have some ajaxified pages and controls in my application. 我的应用程序非常慢,需要花费大量时间将数据加载到.net控件(例如网格,树视图等)中。我的应用程序中还包含一些页面化的页面和控件。 I want to reduce the page load time in each postbacks. 我想减少每次回发中的页面加载时间。

What are the standards/best practices to be followed while developing large asp.net applications? 开发大型asp.net应用程序时应遵循的标准/最佳做法是什么?

Thank you. 谢谢。

NLV NLV

  • Cache certain data, either in the application or in the database (thus breaking normalization but it's okay) 在应用程序或数据库中缓存某些数据(因此可以打破规范化,但是可以)

  • Retrieve the minimum subset of data you really need. 检索您真正需要的最小数据子集。 Don't pull 10000 records from the database into a grid to only display 50. Query for exactly 50. 不要将数据库中的10000条记录拉到网格中以仅显示50条。查询精确为50条。

  • Mimimize the amount of server controls and dynamic markup creation. 尽量减少服务器控件和动态标记创建的数量。 Replace what you can with passive HTML elements. 用被动HTML元素替换您能做的。

  • Switch off the view state, which can potentially expand pages to many megabytes in size. 关闭视图状态,这可能会将页面扩展到许多兆字节。 Pull the data from the database on each request (in combination with caching strategies). 根据每个请求从数据库中提取数据(结合缓存策略)。

You Can use JQuery to retreive the data from database which is much better than using ajax. 您可以使用JQuery从数据库检索数据,这比使用ajax更好。 Check this http://www.codeproject.com/KB/webservices/JsonWebServiceJQuery.aspx 检查此http://www.codeproject.com/KB/webservices/JsonWebServiceJQuery.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM