Sharing: it took some time to sort out and use several ways to improve the efficiency of ASP. NET (I hope you can make a picture)

Source: Internet
Author: User

1. Avoid unnecessary operations
2. Remove unnecessary sessions
3. Do not use Server Control when server control is unnecessary.
4. Disable viewstate if not necessary
5. Do not use exception to control program processes.
Try {
Result = 100/num;
}
Catch (exception e ){
Result = 0;
}
6. Do not use dataset to replace dataset with sqldatareader for read-only data access
7. Disable the debug mode of ASP. NET. The debug mode in Web. config must be false, and the DLL file compilation must be generated into a release version.
8. Use ASP. net output cache to buffer data
9. buffer a large number of rarely updated data
9. Use Stored Procedure data for statistical access whenever possible
10. Static pages are not dynamic.
11. The effects implemented with JS are implemented with JS, and the result of rollback can be reduced when implemented on the client.
12. Switch to server. Transfer without response. Direct
13. Do not open or create an ADO. Net object during one use. Try to use a connection, command, or datareader. Remember to close or release the object immediately when you no longer call the database data.

14. How many data sets are required to avoid non-pagination of fields
15. Do not use dataset or DataGrid.
16. Run on win2003 Enterprise Edition
========================================================== =
Hope you can come in and talk about your thoughts on improving efficiency, and hope to continue adding
I personally think that the efficiency of the system must be taken into consideration from time to time.

I don't need to mention the reason for 1.
2. Reduce memory consumption
3. Reduce the time when server control is interpreted as HTML.
4. Reduce the amount of hidden data added during transmission and reduce the number of transmitted files.
5. Why not let it hit the south wall?
6sqldatareader is more efficient than Dataset
7. It is the version that does not apply debug.
8. The page buffered by the output cache is faster than the static one (no file is read from the Memory output directly)
9. Put the same data in advance and put it in memory faster than in a database or file.
9 The stored procedure is pre-optimized and compiled by the database.
10. Why should I explain it first?
11. I mean to let you go back and forth a few times. Would you like?
12response. Direct needs to return to the customer to report
13 you have a pen in your hand, but you put it down before writing, and then change it
14.
15 I think the DataGrid is too fancy. dataset is used to cache data very well. It will be wasted if you change it frequently.
16win2003 Enterprise Edition is an operating system integrated with. net.

Welcome to: http: // 121.18.78.216, which is a demonstration platform for ease of query and analysis, workflow, content management, and project management.

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.