In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
The main content of this article is to explain "what is the method of ASP.NET website performance optimization", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "what is the method of ASP.NET website performance optimization"!
When developing a website with ASP.NET, performance is always an issue that needs to be considered and concerned. Performance is not only the speed of program code execution, but also involves all aspects of things.
Take a request from ASP.NET, for example, from the time the browser sends the request to the server's ASP.NET website until the entire page is presented in front of us, each step of the request is tuned in a different way, and there are many methods to call, not just common ones: caching, multithreading, asynchronism, etc.
This series of articles decided to talk about tuning from two major aspects:
Foreground tuning: mainly includes how to minimize http requests, starting from http requests, to how to load js, css, how to compress the transmitted data, and so on.
Background tuning: analyze the process of ASP.NET request processing, and give the corresponding tuning method in each step, and give the tuning method in the code organization, architecture and database operation.
I remember when I was just developing a website, caching was the easiest and fastest thing to think of when it came to improving performance, and it was suggested in some of Microsoft's official Best Practice documents: layer by layer caching (caching in the data storage layer, DAL,BLL,UI, etc.). Then the "cache blossoms everywhere" in the website, which is really not satisfactory.
Another common optimization is for databases: use join joins to minimize subqueries, and index fields that often need to be queried. Indeed, these are very general and good rules.
And there is also an experience is that when optimizing performance, if you choose to optimize the code and database, often optimize some operations of the database will bring better results, it is a pity: in the project (at least in some projects I developed), the database is just a data storage device, that is all, did not play a powerful role of the database. Therefore, it is recommended to be familiar with the internal query and storage mechanism of the database, after all, many developers also work as DBA (many companies do not have a formal DBA).
And when we design the database in the project, especially when we design the table field, we need some consideration, many people suggest that the length of the table field is not too long, this is also a common suggestion, but why? In fact, this requires some understanding of the internal storage mechanism of the database: when the database (SQL SERVER) is saved, the data is in the smallest unit of "page". Each page has a size of 8K. If the data in one of your tables exceeds 8K, then the data of this table should be saved in several pages. In this way, when querying the data, it is necessary to query across pages, which requires performance consumption. If the data are all on the same page, it must be faster.
So, to optimize the site, you need to know where the performance is being consumed.
When optimizing a website, it is not blindly generalized. Generally speaking, there are two situations:
1. The website already exists and is running, and now it needs to be optimized.
A new website is being developed from scratch.
In the case of *, the bottleneck of website performance should be identified first, from the request of the foreground to the request processing of the background, to the presentation of the * * page, step by step.
If it is the second case, the situation may be slightly better, and the website is now completely under our control, so a lot of optimization principles can be used in the process of development and design.
Optimization does not necessarily mean code rewriting or making big changes. A little bit of accumulation during optimization, just like the refactoring of code, is a cumulative effect. For example, whether to load js scripts at the beginning of the page, or js scripts throughout the page, sometimes simply adjust the loaded files, or load scripts asynchronously, or transfer scripts through CDN, and so on, the performance is improved. The performance improvement is not without a price, some costs are very small, for example, just put the script load on the page *, the big price is to buy some server devices, such as Content Delivery Network (CDN) to transfer static files (js,css,image) to the client. Therefore, optimization requires a tradeoff strategy.
At this point, I believe that everyone on the "ASP.NET site performance optimization method is what" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.