Bug 61350 - Use unsynchronized xmlbeans
Summary: Use unsynchronized xmlbeans
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: OPC (show other bugs)
Version: 3.17-dev
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-26 22:06 UTC by Andreas Beeker
Modified: 2017-08-24 19:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Beeker 2017-07-26 22:06:13 UTC
As suggested in SO [1] and discussed in the mailing list [2], I'll activate the unsynchronized mode in the XmlBeans options.


[1] https://stackoverflow.com/questions/45082014/
[2] http://apache-poi.1045710.n5.nabble.com/Unsynchronize-xmlbean-calls-td5728316.html
Comment 1 Andreas Beeker 2017-07-26 22:16:25 UTC
applied via r1803120
Comment 2 Dominik Stadler 2017-08-24 19:06:24 UTC
Regression tests showed that this causes multi-threading issues when handling different files in separate threads, therefore we cannot apply this generally. 

Thus this will be reverted for now.

Anybody who wants to use this performance tuning in a single-threaded application can do so by adding the following call before invoking any POI related code:

    org.apache.poi.POIXMLTypeLoader.DEFAULT_XML_OPTIONS.setUnsynchronized();