Also talk about ASP. NET application performance optimization

Source: Internet
Author: User
[I have sorted out the following ideas for optimizing the performance of the projects I have provided to my organization.]
ASP. NET application performance optimization
1 Preface
The main goal of performance optimization is to increase the "number of concurrent users", "throughput", and "reliability" indicators.
In essence, performance optimization should be performed in many aspects, and "point-to-face integration, from table to inside" should be implemented ". For example, from the perspective of cost, we should try to make the changes small and easy to implement; from the perspective of users, we should make quick responses or prompt; from the perspective of software structure, it also takes into account the rationality and scalability of the system structure. It is not difficult to find that it is difficult to implement all aspects when trying some improvement methods.
Here is a simple example:
In a business logic class, we encapsulate some processing methods. One of the methods is to find whether a node ID already exists in the XML file. Then we will naturally think of writing two methods:
XmlDocument LoadXML (string strFileID) // load XML
Bool CheckIDExisit (string strFileID, string strID) // determine whether a node exists
In addition, the XML loading method can be reused elsewhere. On the surface, the structure and functions of the code are correct. However, when you call LoadXML multiple times in your logic, you will find that the program is slow. The reason is that loading XML files is a time-consuming action, and the solution is simple. We can provide several more methods:
Bool CheckIDExisitByXml (string strXml, string strID) // You can check whether a node exists.
Or bool CheckIDExisitByXml (XmlDocument objXml, string strID) // You can check whether a node exists.
In this way, we can use "one-time loading" to implement multiple borrow operations, significantly improving the efficiency. Therefore, factors that can reuse "precious" data sources should be taken into account in software structure design. (Here the "precious" data source refers to various objects or record sets that are obtained after complex processing or long Computing ).
Performance optimization work should be long-term, because our work is always based on OS, Web Server, DB Server, Complier & Program Language and so on. If you are familiar. NET, JAVA, IIS, and J2EE, you will find that some functions or APIs are provided on this platform, but the other is not; so more often we need a transitional solution, when the new version comes out, we may discard the transition scheme for direct configuration or easier implementation of some features. [...]
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.