Excellent Mike! We resolved a LOT of memory issues our servers were having by var scoping our CFCs. We regained around 15% of our memory.
The VarScoper CFC is a great help with that sort of thing. It's worth taking the time installing it on your local system and running it. You'll be amazed at what you've missed. -----Original Message----- From: Mike Francisco [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 16, 2008 2:51 PM To: CF-Talk Subject: RE: Are cfqueries on a UDF effecient? @Dave, Andy: Thank you very much for the reply! Andy, thanks for the reminder on localizing the query variable. I read-up on it and found more details on http://www.daemon.com.au/go/services/training/tips-andamp-tricks/using-varia bles-in-coldfusion-mx-functions Localizing the query var actually addressed some minor issues I was having earlier. Cool! > > Okay... > > Dave's right then. The code contained within those included functions > only runs when the function is called. That said, you need to make > sure you var scope the queries inside each function or you could have > memory issues on the page. > > <cfset var myQuery = ''> > <cfquery name="myQuery " ...> > SELECT id > FROM myTable > </cfquery> > > That prevents that query from living on in memory after the function > returns it. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303596 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

