Well I have noticed that the time to instantiate a CFC, using cfinvoke or
createobject is slower than using a customtag, a clinclude or a UDF.
And the only way to avoid this is to cache the cfc in a persistent scope,
such as application.

When I first tried out the Model-Glue framework I found the speed to be
dire, the pages took seconds to load, compared to milliseconds for the same
site not done using CFC's

Russ 

-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: 19 December 2006 17:09
To: CF-Talk
Subject: RE: Application.cfc vs cfm

> While on this subject. Considering CFC's are slower to instantiate 
> compared to regular .cfm files, how does this affect application.cfm, 
> has anyone tested? Is it slower than using application.cfm and 
> onrequestend.cfm

I haven't bothered doing any testing.

However, I haven't seen any evidence that CFCs are inherently slower than
CFM files. I don't see any reason why they would be, either, once compiled.
I can see why they might take longer to compile, since every method is
compiled into a separate class, but this shouldn't be an issue in a busy
production environment.

It is slower to invoke a CFC from within a CFM file than not to. It appears,
in my limited testing, to be slower to use any formal code reuse mechanism
(CFC invocation, CFML custom tags) than to run code inline or to use a
CFINCLUDE.

Finally, even if there were a cost to doing this, you should only have to
pay it once, when Application.cfc is compiled.

So, in summary, I wouldn't avoid Application.cfc because of performance
concerns.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized instruction
at our training centers in Washington DC, Atlanta, Chicago, Baltimore,
Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264482
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to