Pregunta

I am using docx4j library to create/open/edit docx file. But it takes around 30 seconds to initialize this line

 wordMLPackage           = (WordprocessingMLPackage)loader.get(file);

It takes same time either it simple document(may be empty or single word/line file) or complex document with images and tables. I have increased memory for eclipse in eclipse.ini and VMHeap for emulator but no effect .It is slow on emulator as well as on real device. Please help!

¿Fue útil?

Solución

See forum post wordprocessingmlpackage-load-file-is-extremely-slow

The JAXB context init time is unavoidable (unless you remove some of the packages listed, or hack your JAXB implementation to do some funky on demand type loading), but only needs to be done once.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top