Coldfusion CFC creation taking a variable amout of time to execute.
Posted
by Bazza
on Stack Overflow
See other posts from Stack Overflow
or by Bazza
Published on 2010-03-11T15:28:26Z
Indexed on
2010/03/11
18:19 UTC
Read the original article
Hit count: 242
I've been doing some logging of object creation times in our open account process in production. Periodically, initializing an object would take way longer than expected. By initializing I mean calling it's init() and passing a couple of arguments that may be simple variables or objects. e.g.
<cfset validateObj = createObject("component", "compExample").init(
productionMode = VARIABLES.productionMode,
ipWhiteListed = isWhiteListed,
ipLocatorObj = VARIABLES.ipLocatorObj ) />
Thats all that happens in init() methods. Generally the execution time would be 0ms, but at random times I might get 3 or 3.5 seconds. This is not specific to one particular server or to our generally busy period. It appears to be quite random.
One thought was that these templates were being evicted from our template cache as they are not especially frequently used, although I checked cfstat on a number of servers and the max CP/Sec is -1.
Running CF 8,0,1
Has anybody else ever come across this?
© Stack Overflow or respective owner