You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, the Composer is slowing down exponentially with the document grow.
Append two document of 1000 pages will take 15 minutes...
Can we reduce this time with some parameter like in VB :
Looked at this for a bit. Those documents are pretty big, even for Word or Libreoffice (I had to force quit my LibreOffice instance before it was able to open it).
I was able to profile things using cProfile (script at bottom). On my machine it takes ~20 minutes to combine those docs while profiling, and notably, 13 of those minutes are spent in add_footnotes(), of which 8 of those minutes are spent parsing XML. I don't know how many footnotes those documents have, but personally I've run into other issues with footnotes in this library as well. It might be much faster if you have fewer footnotes.
I have a fix in another branch that speeds things up, but only my a few minutes. When factoring out that parse_xml, it still takes ~18 minutes, only saving about 1000 calls out of 6000 calls to parse_xml, so not that much.
I've attached the zipped profile info file that others can look into further. You can view it with snakeviz.
Also not sure what you mean by the VB options. This library isn't using the Microsoft word API to compose documents like Visual Basic is, it's doing most if it through docxpython, so options like those wouldn't have any effect.
Hi, the Composer is slowing down exponentially with the document grow.
Append two document of 1000 pages will take 15 minutes...
Can we reduce this time with some parameter like in VB :
Testing code:
1000pages_2.docx
1000pages_1.docx
The text was updated successfully, but these errors were encountered: