Did you use something like

<cfinvoke component="foo" method="goo" returnVariable="result">

?

If so, then you are recreating the component on each request. You can,
and probably should, store the CFC one time in a persistant scope.
Your Application.cfc's onApplicationStart could do something like
this:

<cfset application.foo = createObject("component", "foo")>

Then your CFC can do:

<cfinvoke component="#application.foo#" method="goo" returnVariable="reuslt">

or

<cfset result = application.foo.goo()>


On Wed, Jun 9, 2010 at 10:33 AM, Robert Bell <bobert.b...@gmail.com> wrote:
>
> Hello all,
>
> I am having an issue where I have created a Book CFC that is taking way too
> long to cfinvoke.   I had to convert it to a cffunction to get the 
> permformance
> I needed.  The cfc lived in the directory of the template path being used for 
> the cfinvoke, so I assumed that was a relatively efficient way to do it?   
> What can I look at that would affect the component invoking speed ?  Is there 
> any way not to have to cfinvoke so many times, and cache/reuse the component 
> structure in mem and just put the current data in it (and not cfinvoke alot ) 
> ?  I am not explicity tearing down the structures, just doing cfinvokes in 
> loops with new book isbn's etc.  I am a cfcomponent newbie, so be gentle..  
> :)  I would really not have to use functions, and be able to make calls to 
> this remotely, but I am at a loss where to change it.   It performs fine as a 
> function, just not as a component.   Any ideas appreciated.
>
> Thanks,
> Bob
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334415
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to