Nando said the following on 1/22/2006 5:13 AM:
Jerry,
 
1) You can / need to rearchitect your app so that you only instantiate CFC's per request when absolutely necessary. I'd suggest persisting a Factory (or several Factories) as singletons and have them take care of returning instantiated instances of your CFC's. I first got this from studying the Mach-II framework code. Model-Glue also does this.
 
2) You can't rely on the debugging output to gauge straight-line cfc performance. For CFC's, the bulk of the reported timings are from the time it takes for the debugging template to calculate the timings, not from the CFC's execution.
One thing that Nando is saying is that ColdFusion debugging creates a significant amount of overhead when debugging complex CFC models -- the big culprit is display template timings checkbox.  For instance, I have a very complex Mach-II and ColdSpring application that typically takes 20-75ms per request without debugging.  I get this average through the Trace Plugin that now ships with Mach-II (also, I wrote the plugin -- it's very lightweight).  With debugging turned on, the application runs at about 6000 to 8500ms per request.  As you can see, on average that is over 6,000% increase with debugging.

So if you're using debugging timings, they are wrong.  It's would be best to wrap your code in a cftiming and check that...or the older way:

First thing in your application:
<cfset request.startTick = getTickCount() />

Last thing in in your application:
<cfoutput>This request took: #getTickCount() - request.startTick#ms</cfoutput>
-- 
Peter J. Farrell :: Maestro Publishing
http://blog.maestropublishing.com

Rooibos Generator - Version 2.1
Create boilerplate beans and transfer objects for ColdFusion!
http://rooibos.maestropublishing.com/

- Member Team Mach-II
- Member Team Fusion
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to