We're updating the issue view to help you get more done. 

Cachebox ConcurrentStores: concurrency and performance issues

Description

Cachebox's core ConcurrentStore and ConcurrentSoftReference stores have concurrency and performance issues because they use native CFML functions to query the underlying ConcurrentStore java objects (which then bypasses their thread safety and runs unecessary code).

For example, Cachebox uses StructKeyArray( pool ) (where pool is an instance of a Java ConcurrentHashMap). This then uses Lucee/ACF native code to turn the struct keys into an array and these are not thread safe. Instead, we can call methods directly on the ConcurrentHashMap to keep thread safety and improve performance:

1 var keys = CreateObject( "java", "java.util.Collections" ).list( pool.keys() );

We should provide our own versions of these stores (while we wait to submit and get pull requests merged to Coldbox) that are optimized for concurrency.

Environment

None

Status

Assignee

Unassigned

Reporter

Dominic Watson

Labels

None

Accepted

Yes

Fix versions

Priority

Medium