docx4j icon indicating copy to clipboard operation
docx4j copied to clipboard

Unnecessary deep-copy of default RPr degrading performance

Open shelatgauri opened this issue 7 years ago • 2 comments

When converting a docx to pdf, containg large number of runs, the default RPr is deep-copied using marshalling and unmarshalling multiple times for a single document. To save this time, we can deep-copy the default RPr once and save it in thread local. After each iteration of using RPr element, it can be set to default, using the initial conditions(obtained from default RPr). link to the pull-request created : https://github.com/plutext/docx4j/pull/262

shelatgauri avatar Sep 20 '17 07:09 shelatgauri

Updated Conversion.java against commit - https://github.com/syambrij-pro/docx4j/commit/9a4180a66c3d9e1426bb766439241ef26a48b55a

Created another pull request: https://github.com/plutext/docx4j/pull/279

syambrij-pro avatar Jan 22 '18 15:01 syambrij-pro

Screen Shot 2022-05-02 at 3 17 56 PM

Why does substituting the XmlUtils#deepCopy line (source) not suffice?

jamding avatar May 02 '22 22:05 jamding