Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / June 2007



Tip: Looking for answers? Try searching our database.

speeding up gateway calls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chuck1411 - 30 Jun 2007 04:58 GMT
In application.cfc onRequestStart, I've seen the targetPage as
/flashservices/gateway.

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.  I'm
hoping there is a way to use the application.cfc to skip the instantiation of
the service cfc for each call.

Obviously if there is a way I'd need to retain any passed in parameters.  Thx
for any help.
Sean Corfield - 30 Jun 2007 14:30 GMT
>  In application.cfc onRequestStart, I've seen the targetPage as
>  /flashservices/gateway.
[quoted text clipped - 3 lines]
> 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
creation anyway.

Signature

I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo

Chuck1411 - 30 Jun 2007 20:38 GMT
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.  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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.