I'm working w/a legacy app that uses duplicate() to copy the
Application scope into the Request scope to make the variables thread
safe, because there aren't locks in the appropriate place in the code
While experimenting with implement CacheBox to start caching some
data, I noticed that all of the sudden there was a huge jump in
processing of each page request.
Having narrowed down the issue, I've found that the problem is running
the duplicate() method on a CacheFactory instance.
If I run the following code, the "copy" line can take anywhere from 2
to 200 seconds if I'm using ConcurrentStore ObjectStores.
// duplicate the object
copy = duplicate(Application.CacheBox);
If I change to using ConcurrentSoftReferenceStore ObjectStores, then
there's virtually no performance hit (like 0-16ms.)
The problem exists in both CF8 and CF9.
I haven't dug to deeply into the ConcurrentStore source code, but is
this a known issue?
How much of a performance difference is there between ConcurrentStore
Since this is a dedicated app that runs on dedicated servers, I could
probably create the cache in the Server scope--but I always hate
putting stuff in there, it just feels dirty.