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

Dominik Stadler resolved XMLBEANS-525.
--------------------------------------
       Resolution: Won't Fix
         Assignee: Dominik Stadler
    Fix Version/s: unspecified

Contention did not show any more in subsequent tests so it seems the initial 
setup was maybe too limit in memory/hardware to be a valid test-setup.

> Reduce locking/contention in Path.getCompiledPath()
> ---------------------------------------------------
>
>                 Key: XMLBEANS-525
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-525
>             Project: XMLBeans
>          Issue Type: Improvement
>    Affects Versions: Version 3.0.2
>            Reporter: Dominik Stadler
>            Assignee: Dominik Stadler
>            Priority: Critical
>              Labels: 303-candidate
>             Fix For: unspecified
>
>
> When running the large regression test-suite for Apache POI with multiple 
> threads (each working on a single file), I saw that the lock in 
> Path.getCompiledPath() is causing big contention, keeping the test from 
> utilizing multiple CPU cores fully.
> I tested with manually disabling this locking completely, then CPU is 
> utilized much better, however there are potential race-conditions for the 
> static maps.
> It seems in this case where we process a huge amount of different files, 
> write-locks do occur constantly, i.e. there are always new expressions being 
> put into the cache and thus write-locks do occur and keep other threads from 
> accessing the cache.
> Possible options:
>  * test with using using more fine-grained locking on each map separately
>  * maybe we can use concurrent maps and Java 8 Map.computeIfAbsent() directly 
> instead of the lock-get-put-unlock combination.
>  * Add an option to make the caches per thread via thread-local so no locking 
> is needed any more
>  * ?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to