Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
This article discusses:
Common ASP. NET performance myth
Useful ASP. NET performance tips and tricks
Some suggestions for processing databases in ASP. NET
Buffer and use ASP. NET for background processing
This article uses the following technologies: ASP. NET,. NET Framework, IIS
Using ASP. NET to write Web applications is incredibly easy. It is so easy that many developers don't have to spend much time building their applications to achieve very good performance. In this article, I will provide 10 tips for writing high-performance Web applications. My comments are not limited to ASP. NET applications, because they are only a subset of Web applications. This article is not an authoritative guide to Web application performance adjustment-this content can be written into a book. On the contrary, this article can be regarded as a good start point.
I often go to rock climbing before I work in an out-of-the-box environment. Before rock climbing, I always look at the routes in the guide and read the suggestions and advice from people who used to come here. However, no matter how well the manual is, you must take actual actions before trying a specific and challenging climb. Similarly, before you are faced with performance problems or operating a high-throughput site, you can only find ways to write high-performance Web applications.
Our personal experience comes from Microsoft ASP. the NET team is engaged in the underlying architecture program manager, runs and manages www.asp.net, and assists in the architecture Community Server process experience. The Community Server is a few famous ASP. the next version of the. NET application. NET Forums ,. text and nGallery are integrated into one platform ). I'm sure these skills that have helped me will also benefit you.
You should consider separating applications into several logical layers. You may have heard of the term 3-layer (or n-layer) physical architecture. They are typically defined architectural patterns that define physical division of functions across processes and/or hardware. More hardware can be added when the system needs to be scaled. However, you should always avoid performance problems related to processes and machine busyness. Therefore, whenever possible, run the ASP. NET page and related components in the same application.
Because of the boundary separation between codes and layers, using Web services or remote calls will reduce the performance by more than 20%.
The data layer is slightly different, because the database usually uses dedicated hardware. However, the processing cost of the database is still very high. Therefore, when optimizing the code, the performance of the data layer should be the top concern.
Before you begin to solve the performance problems of your application, you must analyze the application to identify the problem. Obtaining key performance counter values (for example, the value of the performance counter for percentage of the time spent in garbage collection) is also important for finding out where the application is most time-consuming. Intuitively, time consumption can often be found.
There are two types of performance improvements described in this article: Large-scale optimization, such as using ASP. NET Cache and repeated micro-optimization. These micro-optimizations are sometimes interesting. Small changes to the code can cause a large volume of movement, resulting in thousands of calls. For large optimization, you may see a huge jump in overall performance. For micro-optimization, a given request may only be adjusted in milliseconds, but the results may be greatly improved based on the total number of requests per day.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.