Dave Carabetta Blog Banner


February 13, 2006

CFCs and Performance with Report Execution Times Turned On


A thread response on CF-Talk got me thinking that there still might be some naivety out there with regard to ColdFusion debugging while doing CFC-heavy development. In the aforementioned reponse in particular, it was noted that the ModelGlue framework "runs very slow." Well, I didn't pursue this in the thread because the thread itself was really about custom tags and I didn't want to hijack it, but I thought the following tidbit would be valuable to developers: When developing a CFC-heavy application in a development environment, you will notice considerable performance degradation if debugging is turned on and you have the "Report Execution Times" checkbox in the CF Administrator checked. This is due to the way the debugging factory goes about doing its time checks. This holds true for both CFMX 6 and 7. If you turn this checkbox option off, you will notice a significant boost in response time. This is why frameworks in particular are seemingly "slower" when compared with their spaghetti code nemesis; they are very CFC-heavy by nature.

Personally, I always keep this option off anyway, regardless of whether or not I'm working with CFCs. Just having the debugging service turned on at all will skew any numbers that it reports. If I really want to know what a page's response time is going to be, that's what load testing tools are for. If you can't afford one of the commercial options you can still use Microsoft's free Web Application Stress Tool.

One last thing to note: NEVER enable debugging in any production environment. Even restricting debug output to a particular IP address address unnecessary overhead to all requests made to the ColdFusion server, regardless of the IP address. The very fact that the service is on for any request slows the whole server down. The IP restriction is just a security feature to limit who can see what the service is outputting.



Comments
Sam Farmer's Gravatar Good to see you made the MXNA aggregator!
# Posted By Sam Farmer on 2/13/06 at 4:12 PM
Dave Carabetta's Gravatar Ha, cheers! Yeah, and it only took 3 months! It's all good. Hopefully there will be some more eyes on this blog...
# Posted By Dave Carabetta on 2/13/06 at 4:20 PM
Raymond Camden's Gravatar I just want to +1 this. I forget this at times and find myself surprised how "springy" my MG code is when pushed to production.
# Posted By Raymond Camden on 2/13/06 at 4:46 PM
Haikal's Gravatar Another nice load testing tool is Apache JMeter. Has all the usual web load test features (like a recording proxy), plus Java and Database performance test capabilites as well.
# Posted By Haikal on 2/13/06 at 6:03 PM
Steven Erat's Gravatar There was actually a bonafide memory leak in CFMX 6.1 when debugging was turned on and left on during high traffic in production leading to out of memory errors, bug 59763. A hotfix was made for 6.1 Updater 1 and rolled into CFMX 7.0.
# Posted By Steven Erat on 2/13/06 at 6:36 PM
fiesta online money's Gravatar Thanks,I think this is one of the most wonderful sites. I have great admiration for you.
# Posted By fiesta online money on 11/21/08 at 3:02 AM

© Dave Carabetta, 2005-2008. This blog licensed under the Creative Commons License. Some rights reserved. This is a personal weblog. The opinions expressed here represent my own and not those of my employer. Blog software provided by Raymond Camden.