Speed isn't everything, it's the only thing. 

Seriously though, what I would like to see is a time difference with 3
algorithms that do the exact same thing. 1 done in CFC, one done in UDF, and
one done in inline code. If UDF and CFC execute the same, I can handle that,
BUT if CFC is slower than UDF I must ask why.

Robert Everland III
Web Developer Extraordinaire
Dixon Ticonderoga Company
http://www.dixonusa.com 

-----Original Message-----
From: Raymond Camden [mailto:jedimaster@;macromedia.com] 
Sent: Friday, November 08, 2002 4:32 PM
To: CF-Talk
Subject: RE: Really bad cfc performance?


> The code I sent was just to illustrate the fact that no matter how 
> optimized the code is within a cfc, there is a minimum amount of time 
> a cfc is going to take to execute.

Right - and this is to be expected.

> Specifically what I was trying to optimize was a check to see of an 
> email address was a duplicate, valid, and not in a remove list. This 
> would require 2 database queries and a run through the validate 
> method. I eliminated the need for the two queries by using query of 
> queries, but was unable to get barely any performance gain...every cfc 
> call is taking ~15ms, no matter what.

15ms seems a bit high. However, remember that the point here is
encapsulation. By having your 'isDupe' method stored in one central
location, you can easily update the code w/o worrying about other templates
that may have had their own versions. You could also add security. I won't
go on - I love CFCs and it's obvious.

The point remains the same. The _fastest_ code will almost always be inline
code. However, speed isn't everything.

-ray



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to