Tips for improving ASP applications (2)

Source: Internet
Author: User
(2) If you are using a version of VBScript 5.0 or higher, you can use the with ... End-with structure, which can also improve the performance of the ASP.
(3) Generally, avoid the use of session variables, because each session variable takes up a thread, session calls are completed one after another. So this will reduce the speed of the ASP, you can use the QueryString set or hidden variables to replace the session variable to store the data. This will be less than the thread used to use the session variable.
(4) If you really can't avoid using session variables, and you have a large number of session variables, you should consider using a Dictionary object.
(5) To open the cache will improve the performance of ASP, such as the use of response.buffer=true in each ASP page is a good habit, it can significantly improve the display speed of the page.
(6) package your data read code into COM components, you will appreciate the compilation and multithreading to bring you the speed of ascension. As we all know, creating a database connection will cost a lot of resources and time, how can we solve this problem? When your component is running at Microsoft Transaction Server (MTS), the connection pool is a good solution to this problem. MTS is a technology based on Windows NT that, when used in conjunction with DCOM, allows you to better distribute COM objects over the network, which is better than using DCOM alone.
(7) Avoid calling COM components multiple times, for example, if you want to write 10 values to a COM component, you have to call 10 COM components, and if you can only call once, you can greatly improve overall performance.
(8) Don't declare COM components like ADO connection objects with application or session scope, because the thread invocations of these multithreaded components are coordinated, thus greatly reducing the performance of the ASP.
(9) When your ASP page has more than 100 lines of code, you'd better consider porting them to COM components, ASP scripts are interpreted at run time, and COM components are compiled.
(10) Do not use Microsoft Word or Excel components to manipulate data, which are not optimized for ASP.
(11) When we develop Web applications, we always like to create a large include file containing all the global variables, but the biggest drawback of this approach is that not all pages need these variables, and each page to deal with these variables, which will greatly affect the speed of the ASP.
(12) Avoid multiple use of request.write, it is best to put them in the whole and into a request.write.
B Network bandwidth
(1) Try to use 100M network card, this will greatly improve the ASP application response time.
(2) If your Web server and database are on the same server, it is recommended that you migrate them to a different database.
(3) It is recommended that COM components be used with MTS.

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.