"Premature optimization is the root of all evil." ~Donald Knuth

Daniel :)


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Knipp, Eric
Sent: Thursday, August 31, 2006 2:07 PM
To: Dallas/Fort Worth ColdFusion User Group Mailing List
Subject: RE: [DFW CFUG] CFC Best Practice Question

As a general rule I put readability/maintainability above performance.  You
can always find ways to improve underperforming code, but you can’t always
figure out poorly written code.  Not that cfinvoke implies ‘poorly written’
but I prefer consistency over a slight performance increase most of the
time.


From: Christopher Jordan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 31, 2006 2:04 PM
To: Dallas/Fort Worth ColdFusion User Group Mailing List
Subject: Re: [DFW CFUG] CFC Best Practice Question

Well, normally I use a method that will keep the object instantiated so I
can keep using it, but in this case really I just need it once and probably
won't return to it. Eh... I suppose I'll stick to what I'm used to. I've not
used cfinvoke before. I just knew it was a way to transiently call a method,
and I thought I read somewhere that that way was quicker. In my case the
speed difference might not even be noticeable.

I just wanted to get a feel for what other folks did in similar situations.
:)

Chris

Knipp, Eric wrote: 
I am not sure if its faster if you’re just calling a single method.  I’d bet
that cfinvoke and createObjec().runMyMethod() are equivalent in performance,
but with createObject() you can keep the object around, while cfinvoke will
destroy the object after your method call is completed.
 
Using cfinvoke is like using your object as a container for UDF’s, while
createObject() will give you an object that you can use for whatever.  I
guess it depends on what you’re more comfortable with?
 

From: Christopher Jordan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 31, 2006 1:56 PM
To: Dallas/Fort Worth ColdFusion User Group Mailing List
Subject: Re: [DFW CFUG] CFC Best Practice Question
 
Is CreateObject() faster?

Knipp, Eric wrote: 
I stay away from cfinvoke, and use createObject() for all my component
activities.
 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Christopher Jordan
Sent: Thursday, August 31, 2006 1:43 PM
To: Dallas/Fort Worth ColdFusion User Group Mailing List
Subject: [DFW CFUG] CFC Best Practice Question
 
Hi everyone.

I'm wondering if there's a best practice involved in calling the method of
one component from another where the two components do not extend each
other. Is it best to use cfinvoke, createobject() or cfobject?

Thanks,
Chris

CONFIDENTIALITY NOTICE: The information contained in this e-mail and
attached document(s) may contain confidential information that is intended
only for the addressee(s). If you are not the intended recipient, you are
hereby advised that any disclosure, copying, distribution or the taking of
any action in reliance upon the information is prohibited. If you have
received this e-mail in error, please immediately notify the sender and
delete it from your system.

 









 
_______________________________________________
Reply to DFWCFUG: 
[EMAIL PROTECTED]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.HostMySite.com 
  www.teksystems.com/
  

CONFIDENTIALITY NOTICE: The information contained in this e-mail and
attached document(s) may contain confidential information that is intended
only for the addressee(s). If you are not the intended recipient, you are
hereby advised that any disclosure, copying, distribution or the taking of
any action in reliance upon the information is prohibited. If you have
received this e-mail in error, please immediately notify the sender and
delete it from your system.







_______________________________________________
Reply to DFWCFUG: 
[EMAIL PROTECTED]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.HostMySite.com 
  www.teksystems.com/
  

CONFIDENTIALITY NOTICE: The information contained in this e-mail and
attached document(s) may contain confidential information that is intended
only for the addressee(s). If you are not the intended recipient, you are
hereby advised that any disclosure, copying, distribution or the taking of
any action in reliance upon the information is prohibited. If you have
received this e-mail in error, please immediately notify the sender and
delete it from your system.


_______________________________________________
Reply to DFWCFUG:
  [email protected]
Subscribe/Unsubscribe:
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
    http://www.mail-archive.com/list%40list.dfwcfug.org/
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
  www.HostMySite.com
  www.teksystems.com/

Reply via email to