You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2019/11/10 01:06:45 UTC

[GitHub] [cxf] scsosna99 opened a new pull request #596: CXF-8149 - Reduce synchronization in AbstractJXBProvider

scsosna99 opened a new pull request #596: CXF-8149 - Reduce synchronization in AbstractJXBProvider
URL: https://github.com/apache/cxf/pull/596
 
 
   Previous version did what I would consider a lot of gratuitous synchronization which can be reduced in a number of ways.
   
   First, use ConcurrentHashMap instead of straight HashMap for managing for tracking the contexts created for classes and packages.  At that point, we only need to do serialization when the collections don't already contain a context for the class or package.
   
   Second, move to a "ConcurrentHashSet" for collectionContextClasses.  Underlying this is a ConcurrentHashMap and is used by ConcurrentHashMap as the KeySet, so we can create one of these for the collectionContextClasses.  At that point, can again reduce synchronizations required.
   
   These changes were made locally at my company to address these synchronizations substantially slowing down some of our web services, and reducing synchronizations substantially improved throughput by - in most cases - reducing synchronizations and letting threads not block each other.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services