This chapter suggests a number of techniques to improve application performance, and you will come across others while learning about ColdFusion. How can you tell whether they are helping in your application? As you'll read in the following subsections, a number of ColdFusion tools are available to help with this task. Execution TimeIn ColdFusion Administrator, you can select the Report Execution Times checkbox under Debugging. This option displays the total time of page processing and execution. By recording a page's execution times, you could see whether changes to the page help improve performance. <cftimer>To determine the execution time of specific lines of code, wrap that code within <cftimer> tags. Results will be displayed in the debug output (default), inline, in HTML comments, or in generated page outlines (depending on the type specified): <cftimer label="some label" type="outline"> Code to time </cftimer> GetTickCount()<cftimer> leverages a function named GetTickCount() internally, and this function may be used directly too: <cfset Start=GetTickCount()> Code to time <cfset End=GetTickCount()> <cfoutput>The time to process is: #End-Start#</cfoutput> |