You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by no...@kaigrabfelder.de on 2016/02/19 17:29:06 UTC
Alternative / Replacement for xmlbeans
Hi there,
I'm wondering if there are any activities or plans for replacing
xmlbeans with something else. I'm asking a) because the xmlbeans is
retired and b) it has some issues in regards to memory usage and more
important scalability.
As mentioned here http://stackoverflow.com/a/34266795/812093 and as we
also saw in our application in threadumps like the following xmlbeans is
locking on the Locale object which leads to waits if multiple threads
tries to create an XSSF workbook at the same time
at java.lang.String.intern(Native Method)
at
org.apache.xmlbeans.impl.piccolo.util.CharStringConverter.convert(CharStringConverter.java:110)
at
org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.parseCdataLiteral(PiccoloLexer.java:3025)
[...]
at
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1277)
at
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1264)
- locked <0x00000007bc8f1708> (a org.apache.xmlbeans.impl.store.Locale)
at
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
at
org.openxmlformats.schemas.spreadsheetml.x2006.main.StyleSheetDocument$Factory.parse(Unknown
Source)
at org.apache.poi.xssf.model.StylesTable.readFrom(StylesTable.java:126)
at org.apache.poi.xssf.model.StylesTable.<init>(StylesTable.java:97)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at
org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:60)
at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:456)
at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:162)
at
org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:241)
at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:175)
at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:143)
Best Regards
Kai
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: Alternative / Replacement for xmlbeans
Posted by no...@kaigrabfelder.de.
Thanks for the the update. Patching or fixing the synchronization in
xmlbeans is an interesting idea. I haven't thought about that. I'll see
if there is something that can be done for this in the xmlbeans code...
Kai
Am 2016-02-19 18:11, schrieb Nick Burch:
> On Fri, 19 Feb 2016, nospam@kaigrabfelder.de wrote:
>> I'm wondering if there are any activities or plans for replacing
>> xmlbeans with something else. I'm asking a) because the xmlbeans is
>> retired and b) it has some issues in regards to memory usage and more
>> important scalability.
>
> Projects can be pulled out of the Attic if needed for a fix. So...
>
>> As mentioned here http://stackoverflow.com/a/34266795/812093 and as we
>> also saw in our application in threadumps like the following xmlbeans
>> is locking on the Locale object which leads to waits if multiple
>> threads tries to create an XSSF workbook at the same time
>
> If there was to be a fix for this, we could potentially petition the
> Attic PMC to let us (i.e. POI+Tika) release XMLBeans 2.6.1 with the
> threading fix in + a fix for the duplicate classes in the jar
>
>
> Longer term though, as Andi says, we probably do want to move away
> from xmlbeans, but there's no massive drive just yet
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: Alternative / Replacement for xmlbeans
Posted by Nick Burch <ap...@gagravarr.org>.
On Fri, 19 Feb 2016, nospam@kaigrabfelder.de wrote:
> I'm wondering if there are any activities or plans for replacing
> xmlbeans with something else. I'm asking a) because the xmlbeans is
> retired and b) it has some issues in regards to memory usage and more
> important scalability.
Projects can be pulled out of the Attic if needed for a fix. So...
> As mentioned here http://stackoverflow.com/a/34266795/812093 and as we
> also saw in our application in threadumps like the following xmlbeans is
> locking on the Locale object which leads to waits if multiple threads
> tries to create an XSSF workbook at the same time
If there was to be a fix for this, we could potentially petition the Attic
PMC to let us (i.e. POI+Tika) release XMLBeans 2.6.1 with the threading
fix in + a fix for the duplicate classes in the jar
Longer term though, as Andi says, we probably do want to move away from
xmlbeans, but there's no massive drive just yet
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: Alternative / Replacement for xmlbeans
Posted by kiwiwings <ki...@apache.org>.
Hi Kai,
I'm working on it ... or at least fiddling around with JAXB in the
unimportant parts of POI
like the xml signature classes.
My plan is to evaluate how JAXB binder vs. xmlbeans works out.
If it's ok for the signature stuff - which is very picky when it comes to
namespaces and modifications generally - then I would move on to XSLF.
I guess, JAXB won't be used in (S)XSSF within the next 1-2 years.
Regarding the memory usage, I wonder if it wouldn't make sense to get rid of
a in-memory xml representation while working on the data ... but having no
xml infoset attached would give away a lot of flexibility ...
(this is at least true for XSLF, my knowledge about (S)XSSF is rather
limited ...)
Andi
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Alternative-Replacement-for-xmlbeans-tp5722053p5722055.html
Sent from the POI - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org