[
https://issues.apache.org/jira/browse/JXPATH-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14650369#comment-14650369
]
Michele Vivoda commented on JXPATH-178:
---
Hi,
do you have any test that shows the improvement ?
I would be curious to see if things get better with 2 maps: one not
synchronized for statically initialized classes and interfaces (eg:
registerAtomicClass), that does not change, and one synchronized for those
registered later.
The ideal would be to register statically all the needed classes in addition to
those initialized at begin in jxpath code, may be with some property file.. so
that is possible to use a map that does not change and does not need to be
synchronized.
For you changes, I believe JXPath is JDK4 where java.util.concurrent is not
available.
> Contention on functions can be reduced
> --
>
> Key: JXPATH-178
> URL: https://issues.apache.org/jira/browse/JXPATH-178
> Project: Commons JXPath
> Issue Type: Improvement
>Affects Versions: 1.3
>Reporter: Rico Neubauer
>Priority: Minor
> Labels: multithreaded
>
> Several series of thread dumps showed us that some avoidable synchronization
> in jxpath causes plenty of blocked threads waiting on the sync block under
> heavy load.
> Using concurrent map makes the things better.
> See this for a proposed fix:
> https://github.com/seeburger-ag/commons-jxpath/commit/eeb7f30f761a6a89e03c2c1421c09968412659af.diff
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)