Well certainly the example in this case isn't a great one. If all you are doing is adding 2 numbers together, then of course CFCs will not be as fast. The same can be said for calling a UDF or custom tag. It would not really be worth your time to abstract such a simple function.
======================================================================= Raymond Camden, ColdFusion Jedi Master for Hire Email : [EMAIL PROTECTED] WWW : www.camdenfamily.com/morpheus Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: jon hall [mailto:jonhall@;ozline.net] > Sent: Friday, November 08, 2002 3:58 PM > To: CF-Talk > Subject: Really bad cfc performance? > > > I've been sitting here all day optimizing the hell out of a complex > import script and couldn't wring anything more that a few seconds off > the time. It ends up the performance issue isn't my code at all, it > because I am using cfcs! > > Check the below code out, I am seeing a significant > performance hit when > looping over a cfc method as opposed to doing basically the same thing > inline. The inline code is about 350 times as fast as the cfc! If I > take the add function out of the cfc, and put into add.cfm the > performance is about the same. That means the performance penalty is > coming from the cfc framework entirely. > > Is this to be expected, or am I off base? If this is expected > behavior...it looks like adding looping over cfc's to my personal list > of bad practices, or instead of looping, always pass a > complex datatype > like an array to a cfc for processing. That seems very limiting...but > it may be the nature of the beast. Anybody know if custom tags behaved > similarly in previous versions of CF? I'd test but I'm lazy :) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

