You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Karl Pauls (JIRA)" <ji...@apache.org> on 2017/10/03 22:02:01 UTC
[jira] [Created] (SLING-7175) Improve concurrency in
FSDynamicClassLoader
Karl Pauls created SLING-7175:
---------------------------------
Summary: Improve concurrency in FSDynamicClassLoader
Key: SLING-7175
URL: https://issues.apache.org/jira/browse/SLING-7175
Project: Sling
Issue Type: Improvement
Components: Commons
Affects Versions: File System ClassLoader 1.0.6
Reporter: Karl Pauls
Assignee: Karl Pauls
Fix For: File System ClassLoader 1.0.8
FSDynamicClassLoader currently maintains two synchronized sets of class names that have been loaded ( a "hit" and a "miss" set). That can be a source of contention when a lot of classes are loaded concurrently.
I think we can optimize this somewhat by a) merging the two sets into one (as they are never used independently from what I can tell) and b) using a Collections.newSetFromMap(new ConcurrentHashMap) instead of a Collections.synchronizedSet(new HashSet()).
Furthermore, the isDirty boolean flag should be volatile as it might be accessed concurrently.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)