Russ, This use to be a huge problem in CF 6 and to a lesser extent CF 7 (probably related to Java 1.4). But as of CF 8 the penalty for instantiation is very slight once the class is compiled. So I have flip-flopped a little bit on this. I used to use a singleton approach and stuff everything in the app scope. But now I'm more judicious and only put things in there that demonstrate a slow instantiation issue.
-Mark Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -----Original Message----- From: Russ Michaels [mailto:r...@michaels.me.uk] Sent: Monday, March 28, 2011 9:22 AM To: cf-talk Subject: Re: cfc creation best practice One of the big advantages of caching your CFC's in memory is to reduce the overhead of instantiating them. If you have a rarely used ADMIN section, then this wont be an issue for for you if they are invoked every time you use them, so I wouldn't make any more work for yourself unnecessarily. On Mon, Mar 28, 2011 at 3:50 AM, Greg Morphis <gmorp...@gmail.com> wrote: > > Awesome! I appreciate the info Brian! > On Mar 27, 2011 9:48 PM, "Brian Kotek" <brian...@gmail.com> wrote: > > > > Since the memory footprint of a CFC is generally very small, I would just > > create everything together at app startup (ideally using ColdSpring) and > be > > done with it. > > > > > > On Sun, Mar 27, 2011 at 7:21 PM, Greg Morphis <gmorp...@gmail.com> > wrote: > > > >> > >> If you have a site or an area of the site that's not going to get used > >> a WHOLE lot would it make sense to create cfc objects (beans, > >> gateways, daos) when you need them or is it still best just to create > >> the gateway and dao object on application start? At what point would > >> you just create it in the application scope? > >> > >> > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343341 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm