What is the best choice to improve ASP performance (7)

zhaozj2021-02-08  230

What is the best choice to improve ASP performance (continued)

(Author: Green Apple studio compilation, 2000 at 13:45 on November 13)

Summary of the rules Now let's re-summarize these rules: * Avoid containing an adovbs.inc file, use other methods to use constants. * When a single recordset is used, the connection string is passed to the ActiveConnection property. * When using multiple record sets on a page, create a Connection object and reuse it in the ActiveConnection property. * Use the simplest pointer and lock of the task that best suits your task. * Exemplary record sets through the AdoDb.Recordset class to get the best performance and maximum flexibility. * Unless it is required in an open environment, avoid using disconnected recording sets. * Do not feel worried about the separate setting record set properties. * When the value in the record set does not need to treat and format it into a unified format, use the getString method to extract data. * When you need more flexibility in design, you don't need to work with metadata of the record set, and extract data into an array using the getRows method. * When you need to design flexibility and metadata, you will constrain your domain in a local variable before entering a loop of a data recovery. Avoid using the name reference domain. * Do not use a temporary string to collect output. Conclusion, the most important point we have learned from these tests is that small changes will have a big impact in performance. If we compared to the first test with ADO__09.asp (the fastest result of the recording set cycle), it can be seen at least 50% in the reaction time. If we compare the first test with all the tests, that is, when using getString method, it will find that the reaction time is only a small part of the original value. So I have to remember, never want to be of course. If you can't affirm, run some targeted tests. Information related to this article: http://www.asptoday.com/articles/images/20000426.zip. >>>>> full text <<<<<

转载请注明原文地址:https://www.9cbs.com/read-1396.html

New Post(0)