Thank you! 🙏 🙏🙏 This worked like a charm! Performance bump easily ~ 20%.
Thread-wise should be safe as files are never shared among different
threads, but I will keep an eye on it making sure things are ok.

On Wed, May 25, 2022 at 3:21 PM PJ Fanning <fannin...@yahoo.com.invalid>
wrote:

> Maybe you could try to make XmlBeans unsynchronized using this method?
>
>
> https://xmlbeans.apache.org/docs/5.0.0/org/apache/xmlbeans/XmlOptions.html#setUnsynchronized()
>
> Look at https://poi.apache.org/components/configuration.html and the bit
> about
> org.apache.poi.ooxml.POIXMLTypeLoader.DEFAULT_XML_OPTIONS
>
> In theory, this should compile but I haven't tested it.
>
>
> org.apache.poi.ooxml.POIXMLTypeLoader.DEFAULT_XML_OPTIONS.setUnsynchronized()
>
> There is no guarantee that you won't get concurrent updates interfering
> with each other if you do this. Presumably, XmlBeans synchronization is
> there for a good reason.
>
>
>
>
>
>
> On Wednesday 25 May 2022, 20:12:23 IST, Wabi Sabi <wabisabi2...@gmail.com>
> wrote:
>
>
>
>
>
> Thank you so much for your feedback! After profiling the app a bit, it
> looks like the top hotspot is in
> org.apache.xmleans.impl.values.XmlObjectBase.monitor. It's locking access
> for most cell ops e.g.:
>
> public final void setBigDecimalValue(BigDecimal obj) {
>     if (obj == null) {
>         this.setNil();
>     } else {
>         synchronized(this.monitor()) {
>             this.set_prepare();
>             this.set_BigDecimal(obj);
>             this.set_commit();
>         }
>     }
> }
>
> It's basically hogs execution the most. Wonder what's the best way to try
> fixing it? Replace the abstract class with custom non-synchronized
> implementation?
>
> On Sat, May 21, 2022 at 6:03 AM Andreas Reichel <
> andr...@manticore-projects.com> wrote:
>
> > One more thing: Swapping/Paging!
> >
> > The least thing you need to ensure is that you have enough RAM to hold
> > your 10 WorkSheets in memory without paging/swapping involved.
> > Depending on your workbook, that can be huge memory!
> >
> > As soon as swapping/paging kicks in, any performance measurement is
> > useless because IO will be the bottleneck and dominate your tests.
> >
> > On Unix/Linux, engage VMSTAT and ensure, there is no SO/SI shown during
> > your test.
> >
> > Good luck
> > Andreas
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
> For additional commands, e-mail: user-h...@poi.apache.org
>
>

Reply via email to