[ 
https://issues.apache.org/jira/browse/CXF-4650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503900#comment-13503900
 ] 

Daniel Kulp commented on CXF-4650:
----------------------------------

First off, the patch is not usable.  The API module cannot reference the 
JAXBDataBinding object.    I've gone ahead and moved the pools directly into 
the JAXBDataBinding object and updated the code to use that.  I've attached a 
new patch that shows that for you to look at.

HOWEVER, I'm not seeing ANY performance increase at all with it. In fact, I'm 
seeing a very slight performance decrease.   On my machine, the 
benchmark/performance/soap_http_doc_lit (in the cxf trunk) drops from ~4840 tps 
to about 4725 tps.  

In previous testing that I've done, the only time pooling them has yielded any 
benefit is when you are passing an InputStream or Source into the unmarshaller. 
  There are some major locks and other things in the unmarshaller around 
setting up the parsers for those cases which does improve by pooling them.  
However, CXF doesn't use those methods.  It uses the method that takes the 
XmlStreamReader which does not have to setup the parsers.   Thus, there is no 
benefit to the pooling (and the overhead of maintaining the pool becomes a 
detriment).

In addition, the patch also does some things with like: 
unmarshaller.setEventHandler(null);    With the RI JAXB, there is a big 
difference in behavior if you call unmarshaller.setEventHandler(null);  or not 
call it at all.   We certainly would not be able to call it in many cases.   
We'd like need separate pools for the unmarshallers that have had an event 
handler set compared to those that have not (and won't).



                
> Pool JAXB Unmarshallers/Marshallers for better performance
> ----------------------------------------------------------
>
>                 Key: CXF-4650
>                 URL: https://issues.apache.org/jira/browse/CXF-4650
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAXB Databinding
>            Reporter: Peng Zhang
>            Assignee: Daniel Kulp
>            Priority: Minor
>             Fix For: NeedMoreInfo
>
>         Attachments: CXF-4650.patch, patch-4650.txt
>
>
> To help improve performance, refer to code from Axis2 to pool 
> unmarshallers/marshallers.
> From our performance test, it can improve throughput by around 10 percent.
> Please check the attached patch for 2.6.x branch. Thanks.
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to