Bug 163607 - PDF: slow export with "reduce image resolution" or "JPEG compression"
Summary: PDF: slow export with "reduce image resolution" or "JPEG compression"
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
24.2.6.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2024-10-24 16:06 UTC by Antoine Pitrou
Modified: 2025-01-11 19:30 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Pitrou 2024-10-24 16:06:42 UTC
I'm currently writing a presentation using Impress and export to PDF is very slow. It takes more than 30 seconds using "Direct export to PDF" even though the presentation is quite simple.

Presentation characteristics:
- 19 slides
- ODP file is ~500 kB
- exported PDF file is ~630 kB

The exported PDF file itself is fine, it loads and renders quickly with a PDF reader.

**Note:** I'm using the snap version of LibreOffice on Ubuntu 22.04, in case that matters.

Version: 24.2.6.2 (X86_64) / LibreOffice Community
Build ID: 8e9a753d9daaea75c34b417ba1bdf556bf2fc5b3
CPU threads: 24; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: CL threaded
Comment 1 m_a_riosv 2024-10-24 19:41:22 UTC
Direct export uses the last options used in Menu>File>Export as>Export as PDF.
Comment 2 Antoine Pitrou 2024-10-24 19:55:04 UTC
(In reply to m_a_riosv from comment #1)
> Direct export uses the last options used in Menu>File>Export as>Export as
> PDF.

I see. I don't think I have changed any option in the past. Should I try anything specifically?
Comment 3 m_a_riosv 2024-10-24 20:10:39 UTC
If you have marked 'Universal accessibility', test no marking 'Tagged PDF'
Comment 4 Antoine Pitrou 2024-10-24 20:14:20 UTC
Ok, I have disabled both options now, and it's still as slow.
Comment 5 Antoine Pitrou 2024-10-24 20:27:18 UTC
Ok, I have found the two responsible options:

- if I disable "reduce image resolution" and select "JPEG compression", PDF export takes ~8 seconds
- if I disable "reduce image resolution" and select "lossless compression", PDF export takes ~3 seconds

So the main contributor is "reduce image resolution" and a secondary contributor is "JPEG compression".

(I'll note that this all runs on a single CPU core even though I have a 12-core CPU)
Comment 6 Antoine Pitrou 2024-10-25 12:45:39 UTC
One additional finding:
- the 30+ seconds export is with "reduce image resolution" enabled and set to 300 DPI
- if I set it to 75 DPI, the export takes ~15 seconds instead, which is better but still quite slow
Comment 7 m_a_riosv 2024-10-25 15:25:25 UTC
Please attach a sample file(s).
Comment 8 Antoine Pitrou 2024-10-25 15:26:50 UTC
Is it ok if I send it privately for now? The file is meant to be later published, but it's not the final version yet.
Comment 9 m_a_riosv 2024-10-25 15:37:24 UTC
Ok
Comment 10 Antoine Pitrou 2024-10-25 15:50:45 UTC
Ok, I've e-mailed it to you @m_a_riosv
Comment 11 m_a_riosv 2024-10-26 22:32:25 UTC
For me only about 15 seconds with
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

But disabling 
General - Archival (PDF/A ISO 19005)
makes it to export much quicker.

I think the slowness is with images with transparency, which can be located through the side browser. Especially the ones that are one on top of the other.