Quantcast
Channel: Adobe Community : Discussion List - ColdFusion
Viewing all articles
Browse latest Browse all 6243

What are the pros and cons of storing heavely used CFCs in the application scope?

$
0
0

I've been storing all the required CFCs for a site in the application scope. During onApplicationStart I do something like this application.objSomeCfc =CreateObject('component', 'com.someCfc').init().

 

Here is my reasoning.

  • Get the CFCs initialized once and stored in memory for better performance.
  • Using CreateObject several times on each page load can have a negative impact on performance.
  • Having one place to create application scoped CFCs makes it easier to manage code.

 

So is my thinking flawed? Are there any additional pros or cons for dealing with CFCs? Is there any docs, articles, blogs, videos, frameworks, ...... that I should check that may change my perspective on how I'm doing this?

 

Thanks


Viewing all articles
Browse latest Browse all 6243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>