Bug 101310 - PDF export time is quadratic in size of document
Summary: PDF export time is quadratic in size of document
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
(earliest affected)
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
Keywords: filter:pdf, perf
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
Reported: 2016-08-04 23:01 UTC by jmmorlan
Modified: 2021-12-03 04:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description jmmorlan 2016-08-04 23:01:02 UTC
Exporting large documents to PDF is disproportionally slow. Something is taking time quadratic in the size of the document:

$ python -c 'for i in xrange(50000): print "%06d" % i' > 50k.csv
$ python -c 'for i in xrange(100000): print "%06d" % i' > 100k.csv
$ python -c 'for i in xrange(150000): print "%06d" % i' > 150k.csv
$ python -c 'for i in xrange(200000): print "%06d" % i' > 200k.csv
$ python -c 'for i in xrange(250000): print "%06d" % i' > 250k.csv
$ time soffice --headless --convert-to pdf 50k.csv
convert /home/jeffrey/tmp/50k.csv -> /home/jeffrey/tmp/50k.pdf using filter : calc_pdf_Export

real	0m7.732s
user	0m7.635s
sys	0m0.115s
$ time soffice --headless --convert-to pdf 100k.csv
convert /home/jeffrey/tmp/100k.csv -> /home/jeffrey/tmp/100k.pdf using filter : calc_pdf_Export

real	0m25.060s
user	0m24.969s
sys	0m0.108s
$ time soffice --headless --convert-to pdf 150k.csv
convert /home/jeffrey/tmp/150k.csv -> /home/jeffrey/tmp/150k.pdf using filter : calc_pdf_Export

real	0m52.982s
user	0m52.864s
sys	0m0.132s
$ time soffice --headless --convert-to pdf 200k.csv
convert /home/jeffrey/tmp/200k.csv -> /home/jeffrey/tmp/200k.pdf using filter : calc_pdf_Export

real	1m28.181s
user	1m28.037s
sys	0m0.154s
$ time soffice --headless --convert-to pdf 250k.csv
convert /home/jeffrey/tmp/250k.csv -> /home/jeffrey/tmp/250k.pdf using filter : calc_pdf_Export

real	2m18.007s
user	2m17.835s
sys	0m0.167s
Comment 1 Buovjaga 2016-08-07 16:10:55 UTC

Arch Linux 64-bit, KDE Plasma 5
Build ID: 5.2.0-1
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Comment 2 QA Administrators 2017-11-16 09:22:43 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2019-12-03 13:51:25 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2021-12-03 04:20:22 UTC
Dear jmmorlan,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team