pqzx / html2docx

Convert html to docx
MIT License
69 stars 49 forks source link

Poor Performance for Large Tables #57

Open dashingdove opened 1 year ago

dashingdove commented 1 year ago

When inserting large tables, the following code performs terribly:

image

This actually seems to be the fault of the docx package, as the cell function is not very efficient. I have raised this issue over there too. However, if you instead call Table._cells once before the loop and then refer to that array inside the loop, then it improves the performance drastically.

dashingdove commented 1 year ago

Fix: #58