Why ask me? I showed the code in my email. It would take only minutes to
see for yourself where I am coming from.

Matt Liotta
President & CEO
Montara Software, Inc.
http://www.montarasoftware.com/
888-408-0900 x901

> -----Original Message-----
> From: Joe Eugene [mailto:Jebebox@;earthlink.net]
> Sent: Saturday, November 09, 2002 1:18 PM
> To: CF-Talk
> Subject: RE: Really bad cfc performance?
> 
> > Replacing the CFC with a Java class doesn't yield much of an
> > improvement.
> 
> Matt.. are you sure about this? In CFMX writing components in
> Java... appears to be very fast compared to the CF Component
> implementation...loops ... Math.. Arrays.. data manipulation just
crank
> up!.
> 
> Joe
> 
> > -----Original Message-----
> > From: Matt Liotta [mailto:mliotta@;r337.com]
> > Sent: Friday, November 08, 2002 4:33 PM
> > To: CF-Talk
> > Subject: RE: Really bad cfc performance?
> >
> >
> > Replacing the CFC with a Java class doesn't yield much of an
> > improvement.
> >
> > Add.java:
> > public class Add
> > {
> >     public int add()
> >     {
> >             return 1 + 1;
> >     }
> > }
> >
> > Matt Liotta
> > President & CEO
> > Montara Software, Inc.
> > http://www.montarasoftware.com/
> > 888-408-0900 x901
> >
> > > -----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 :)
> > >
> > >
> > > add.cfm
> > > -------
> > > <cfsetting showdebugoutput="No">
> > > <cfset objAdd = createObject("component", "add")>
> > >
> > > <cfset start = getTickCount()>
> > > <cfloop from="1" to="5000" index="i">
> > >         <cfset rs = objAdd.add()>
> > > </cfloop>
> > > <cfset end = getTickCount()>
> > >
> > > <cfset time = end - start>
> > > <cfoutput>#time# ms</cfoutput><br>
> > >
> > >
> > >
> > > <cfset start = getTickCount()>
> > > <cfloop from="1" to="5000" index="i">
> > >         <cfset rs = 1 + 1>
> > > </cfloop>
> > > <cfset end = getTickCount()>
> > >
> > > <cfset time = end - start>
> > > <cfoutput>#time# ms</cfoutput>
> > >
> > >
> > >
> > > add.cfc
> > > -------
> > > <cfcomponent>
> > >         <cffunction name="add" returntype="numeric">
> > >                 <cfreturn 1 + 1>
> > >         </cffunction>
> > > </cfcomponent>
> > >
> > > --
> > >  jon
> > >   mailto:jonhall@;ozline.net
> > >
> > >
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to