Performance issues
Closed this issue · 2 comments
Processing time seems to increase much faster than the number of records or the number of merge fields would suggest.
I have a routine that uses merge_template to produce a document with a page per record, with 30 merge fields. It takes less than a second if there's one record, 10-15 seconds for 10 records, more than a minute for 20, and times out after 4 minutes (a web server setting) for 30, which suggests each additional record is taking at least quadratically more time. Just to make sure it wasn't something else in the document, I stripped it down to just be the merge fields and nothing else (images, formatting, etc.) with no effect.
Note that this was not an issue in 0.3.0! Producing the same document using merge_pages would take a fraction of a second with 30 records!
Environment:
debian 10
python 3.7.3
docx-mailmerge 0.5.0 (same on 0.4.0)
In fact, doing a quick test, with 0.3.0 and merge_pages, I can produce a document with >100 record in less than a second. So it's as if the performance has somehow gotten hundreds or thousands of times worse.