> > Is it possible to clone a CFC, create a completely independent
> copy? How?
>
> You have to write all the relevant code yourself, including calling
> createObject() and copying all the base data etc etc.

That's what I wanted to be certain of, that there's no built-in function to
clone a cfc object. Interesting omission.


> In other words, you will not get any savings this way.

Right, not if a bunch of code is required to make the clone.


> if you need the CFC per request then the chances are that the
> overhead is so small it really doesn't matter.
>
> Premature Optimization...
> --
> Sean A Corfield -- http://corfield.org/

For a simple query and record list of a few rows, using the 'request.MyCFC =
application.MyCFC' method, which we know isn't workable, processing the
request takes 10ms on my machine almost always. Using CreateObject every
time, it takes 20-40ms.

None of these are big numbers. Still, for "engine"-level things like this,
if thinking it through completely reveals a faster way, I'd use it, all
other things being equal.

If there is a faster way. Which I now know there is not :) .

e




----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to