[ 
https://issues.apache.org/jira/browse/SLING-7175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karl Pauls updated SLING-7175:
------------------------------
    Attachment: SLING-7175.patch

[~cziegeler], I think the attached [^SLING-7175.patch] should do the trick - 
should I apply it?

> 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
>
>         Attachments: SLING-7175.patch
>
>
> 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)

Reply via email to