What is the best choice for improving ASP performance (i)

Source: Internet
Author: User
Tags error handling zip
ASP developers continue to work to achieve better performance and scalability in their design projects. Fortunately, there are many books and sites that offer good advice in this regard. However, these recommendations are based on the structure of the ASP platform to draw conclusions, the actual performance of the improvement is not measured. Because these recommendations require a more complex coding process and reduce the readability of the code, developers can only measure the cost of improving the performance of their ASP applications alone, without seeing the actual effect.
This article is divided into two parts, and I'll introduce some performance test results to help developers determine whether a particular initiative is not only worthwhile for future projects, but can also update the original project. In the first part I will review some of the fundamental issues of ASP development. In the second section, we will cover some of the most optimized ADO functions and compare their results with ASP pages that invoke the same ADO function as the VB COM object. These results are eye-opening, and sometimes surprising.
In this article, we will answer the following questions:
* What is the most efficient way to write ASP-generated content to the response stream?
* Should the buffer be turned on?
* Should you consider adding comments to your ASP code?
* Should you explicitly set the default language for the page?
* Should the session state be closed if not required?
* Should the scripting logic be placed in subroutines and function areas?
* What is the effect of using the Include file?
* What kind of load will be imposed when performing error handling?
* Does setting a context handle have an impact on performance?
All tests are done with Microsoft's Web Application Focus tool (WAST), a free tool that can be found here (http://webtool.rte.microsoft.com/). I used wast to create a simple test script that repeatedly calls the ASP page tests described below (each more than 70,000 times). The response time is based on the average last byte total time (TTLB), which is the time from the initial request to the tool receiving the last data from the server. Our test server is a Pentium 166, the memory is 196MB, the client is Pentium 450, the memory is 256MB. You may think that these machines are not very advanced in performance, but don't forget that we are not testing the capacity of the server, we just want to test the time it takes for the server to work on one page at a time. These machines do not do other work during the test. WAST test scripts, test reports, and all ASP test pages are included in the zip file (http://www.asptoday.com/articles/images/20000113.zip), which you can review and test yourself.
What is the most effective way to write ASP-generated content to the response stream?
One of the most important reasons for using ASP is to generate dynamic content on the server. So obviously, the starting point of our testing is to determine the most appropriate way to send dynamic content to the response stream. Of the many choices, two are most basic: one is using inline ASP tags and the other is using Response.Write statements.
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.