Ask a Question related to Macromedia ColdFusion, Design and Development.
-
braseth #1
how do I indentify which section of code is slow?
I have a query that loops over several CFIF statements. The page seems to be
rendering too slow. Is there a way where I can put some code around several
blocks of code, to display the amount each block is taking to process? The
debugger gives me a total, but I'm trying to isolate sections. I am using CFMX 6
braseth Guest
-
PHP: Restrict access to a section of code
hi guys, I have implemented the login/user auth sections of my webby without any problems. Ive used the built in server behaviours in DW8. So i... -
Section headers—did I do it right?
Hi, I've created a multi-section document in InDesign CS. I'd like each odd-numbered header to contain that section's title. After hours of... -
SLOW DOWN..Why is my Photoshop CS Super Slow in PANTHER?
G5 DUAL 2GHZ .. 1 GB RAM .. PHOTOSHOP CS .. PANTHER/JAGUAR ........................................................... I've had my DUAL G5 since... -
How can I keep a section of code from firing?
I am wondering if I am attempting the impossible on one page. CODE: set current= cConn.Execute(SQLCurrent) Do Until current.eof Response.Write... -
Injecting code into the <head></head> section
Hi All, I have a web user control that, among other things, provides Print this page, and Email this page functionality I have this script that... -
CF_DAWG #2
Re: how do I indentify which section of code is slow?
If you were using CFMX 7, I could tell you to use the <cftimer> tag, but how
about doing it this way instead. You could output the time before your code
executes and after it is done. Like this:
<cfoutput>#now()#</cfoutput>
execute your slow code
<cfoutput>#now()#</cfoutput>
You could do calculations on it to, like:
<cfset variables.before = now()>
execute your slow code
<cfset variables.totalTime = now() - variables.before>
<cfoutput>#variables.totalTime#</cfoutput>
Hope this helps!
CF_DAWG Guest
-
CF_DAWG #3
Re: how do I indentify which section of code is slow?
You can also use the <cftrace> tag and it will return more information than my code from my previous post. Look in your documentation for more syntax on <cftrace>.
CF_DAWG Guest
-
OldCFer #4
Re: how do I indentify which section of code is slow?
You could use GetTickCount() to time code blocks
<cfset Start = GetTickCount()>
Slow code block
<cfset TimeToRun = GetTickCount() - Start>
<cfoutput> It took #timeToRun# milliseconds to run the code</cfoutput>
OldCFer Guest



Reply With Quote

