ASP Program Performance test report (III)

Source: Internet
Author: User
Should be referenced by including references?
The provided by Microsoft contains 270 lines of code that define most of the ADO property constants. Our example references only 2 constants from the So in this test (ado__02.asp) We removed the include file references, and set the properties directly using the corresponding values.
Objrs.cursortype = 0 ' adopenforwardonly
Objrs.locktype = 1 ' adlockreadonly

You can see that the page overhead is down by 23%. This value does not affect the extraction and display time of a single record, because the changes here do not affect the recordset operation within the loop. There are a number of ways to resolve reference problems. We recommend that the file be used as a reference, and that it be explained by annotations when set. Keep in mind, as the first part points out, that proper use of annotations has minimal impact on the efficiency of the Code. Another approach is to copy the constants that need to be used from the file to the page.
There is also a good way to solve the problem, which is to make all the ADO constants available directly by linking the ADO type library. By adding the following code to the Global.asa file, you can access all the ADO constants directly:
<!--METADATA type= "TypeLib"
file= "C:Program FilesCommon FilesSYSTEMADOmsado15.dll"
Name= "ADODB Type Library"-->
<!--METADATA type= "TypeLib"
Uuid= "00000205-0000-0010-8000-00AA006D2EA4"
Name= "ADODB Type Library"-->
Therefore, our first rule is:
L avoid including files, access and use ADO constants in other ways.

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: 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.