What is the best choice for improving ASP Performance (cont.)

Source: Internet
Author: User
Summary of rules
Now let's review the rules:
* Avoid including adovbs.inc files and use constants in other ways.
* When a single Recordset is used, the connection string is passed to the ActiveConnection property.
* When multiple recordsets are used on a page, create a Connection object and reuse it in the ActiveConnection property.
* Use the simplest types of pointers and locks that best fit your task.
* Use the Adodb.recordset class to sample recordsets for best performance and maximum flexibility.
* Avoid using disconnected recordsets unless required in a disconnected environment.
* Do not worry about setting the recordset properties individually.
* Use the GetString method to extract data when the values in the recordset do not need to be treated in a special way and can be formatted as a uniform format.
* When you need more flexibility in design, but do not need to work with the recordset's metadata, use the GetRows method to extract the data into an array.
* When you need the flexibility and metadata to design, constrain your domain to local variables before entering a data recovery loop. Avoid referencing fields by name.
* Do not use temporary strings to collect output.
Conclusion
Again, one of the most important things we've learned from these tests is that small changes can have a big impact on performance. If we compare the first Test with the ado__09.asp (the fastest result of the cycle in the Recordset), we can see at least a 50% reduction in the reaction time.
If we compare the first test with the fastest in all tests, that is, using getstring, the reaction time is only a small fraction of the original value.
So remember, never take it for granted. If you're not sure, run some targeted tests.
This article related data: Http://www.asptoday.com/articles/images/20000426.zip.

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.