Remote Synthesis
Search my blog:
Viewing By Entry / Main
Apr 07, 2006

ColdFusion Debugging Performance Hit

This is one of those things that you realize and it seems rather obvious after the fact, but I never bothered to think through. Based upon my experience today it appears that using <cfsetting showdebugoutput="false"> hides the debugging but does not impact the performance hit you take when running debugging. This becomes obvious when you are running Model-Glue and/or Reactor. With debugging turned on, my page response was excrutiatingly slow. Adding the cfsetting had little to no impact on that. However, with debugging turned off in the ColdFusion administrator, the performance was totally reasonable (especially considering that both Reactor and Model-Glue were running in their respective development modes). Anyway, like I said, this seemed obvious to me once I realized it, but I figured might save someone some grief.

Comments
Raymond Camden
Interesting. If you look at classic.cfm, the code thats run for debugging, it checks to see if debugging is active and then doesn't do any work if no. So that should save _some_ time, but I guess you still have the &quot;work&quot; being done by the back end to store the data.


Brian Kotek
Yes this is true. Even if you set showdebugoutput to false, the CF engine still calculates all of the timing information, it simply doesn't display it. The performance hit you get with debugging turned on is due to the calculation of the timing data, not the display of it.


Brian Kotek
Also just to be clear, the only way to avoid the performance hit is to disable debugging completely (not just IP addresses or setting showdebugoutput to false, you have to completely turn it off in the CF administrator), OR you can save a lot of the hit by unchecking the box labeled &quot;Report Execution Times&quot; which is where the vast majority of the performance hit is accrued.


Brian Rinaldi
Brian, Actually I found that with debugging set for only particular IP addresses (and mine turned off), the performance seemed only very slightly impacted compared to having it turned off completely (but the difference was still night and day).


Brian Kotek
Brian R., you're right! I had last tested this in CFMX 6.1 and I'm almost positive it didn't matter, but on CFMX 7 it does. So if debugging is on but you're IP is not in the IP list for debugging info, you also avoid the hit. Thanks for the heads up.


Write your comment



(it will not be displayed)