coldfusion - Is it more efficient (Performance) to store the CFC in application variables OR instance the CFC on the page call? -
i'm working on coldfusion dynamic website. website, there lot of cfcs , lot of functions within each cfc. would more efficient store instance of cfc in application variable, instance each cfc separately on each page load.
for each page, @ 2 separate cfcs called. i'm interested in how performance effected when requests increase (stress).
thanks!
it depends. if cfcs in question singletons yes, it's wise instantiate them once , store them application scope. more experienced , application grows you'll find best tool manage object dependencies coldspring, creating object in onapplicationstart()
best bet. if dealing transient objects you'd need create object per request.
Comments
Post a Comment