This content has been marked as final. Show 2 replies
In article <email@example.com>
> In application.cfc onRequestStart, I've seen the targetPage as
> How do I utilize that to make the call use an instantiated object
> to speed up access? Currently the only way I know is to allow the
> service cfc to be called (instantiated) with each call, and within it
> to call a scope resident cfc.
Remoting calls - like web service calls - always create a new instance
of the CFC.
Are you really seeing a performance improvement by having your service
CFC delegate to a shared scope instance?
I ask because I ran a number of performance tests against my IRCbot
(an event gateway CFC - which is also created on every request). I
found no noticeable performance improvement from keeping a single
instance of the CFC in application scope and delegating from a simple
event gateway CFC to that shared instance, compared to just letting
ColdFusion create the CFC on each request.
You may be spinning cycles trying to optimize something that doesn't
actually need optimizing...
It's also worth noting that CF8 has *dramatically* speeded up CFC
I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo
Thx, that is good to know. Your right, I had just presumed that an already instantiated object would be faster. At the moment I have a service cfc that include's the appropriate method on call, so not every method gets instantiated (with each service cfc call). I'd assumed I would need to recreate this so that each method would be a cfc on its own, and would get instantiated into a struct array of objects the first time it is called and then recalled each time after as needed. I guess I don't have to do that.