Bug 137746 - Slow PDF export of shape with gradient fill and linear transparency
Summary: Slow PDF export of shape with gradient fill and linear transparency
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, perf, regression
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2020-10-25 19:35 UTC by Pablo
Modified: 2022-12-29 06:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Shape with gradient fill and linear transparency (17.11 KB, application/vnd.oasis.opendocument.presentation)
2020-10-25 19:36 UTC, Pablo
Details
Shape with gradient fill and solid transparency (14.58 KB, application/vnd.oasis.opendocument.presentation)
2020-10-25 19:36 UTC, Pablo
Details
Shape with gradient fill (no transparency) (15.89 KB, application/vnd.oasis.opendocument.presentation)
2020-10-25 19:37 UTC, Pablo
Details
Shape with solid fill (no transparency) (9.86 KB, application/vnd.oasis.opendocument.presentation)
2020-10-25 19:37 UTC, Pablo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo 2020-10-25 19:35:26 UTC
Description:
The attached gradient-linear-transparency.odp has a shape with gradient fill and linear transparency. Converting to PDF from the command line takes 3.2 seconds compared to 1.3 seconds with a solid transparency. When exporting a presentation with many slides and gradients this adds up.

Steps to Reproduce:
1. Measure the time it takes to convert gradient-linear.transparency.odp to pdf with the following Linux command:
time libreoffice --headless --convert-to pdf gradient-linear-transparency.odp
2. Compare with the time it takes to convert the other attached presentations:
time libreoffice --headless --convert-to pdf gradient-solid-transparency.odp

Actual Results:
Conversion of the gradient-linear-transparency.odp takes about 3.2s.
Conversion of the other presentations takes about 1.3s.

Expected Results:
Faster conversion to PDF.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.2.2
Build ID: 00(Build:2)
CPU threads: 1; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_IL); UI: en-US
Ubuntu package version: 1:7.0.2_rc2-0ubuntu0.20.04.2
Calc: threaded
Comment 1 Pablo 2020-10-25 19:36:01 UTC
Created attachment 166706 [details]
Shape with gradient fill and linear transparency
Comment 2 Pablo 2020-10-25 19:36:37 UTC
Created attachment 166707 [details]
Shape with gradient fill and solid transparency
Comment 3 Pablo 2020-10-25 19:37:03 UTC
Created attachment 166708 [details]
Shape with gradient fill (no transparency)
Comment 4 Pablo 2020-10-25 19:37:27 UTC
Created attachment 166709 [details]
Shape with solid fill (no transparency)
Comment 5 Buovjaga 2021-07-27 13:15:30 UTC
I first observed a very slight difference, but it is much more clear when duplicating the slide like 9 times. The solid one does not increase its time, but the transparent one does.

NixOS
Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 67e47070a7580a17804adce812cc2f98bfe7b51f
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: x11
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Comment 6 Buovjaga 2021-08-14 17:57:16 UTC
Bibisected with Linux 43all repo to range 4316e643ef345b0f673b4a03a80a4b7cb3185588...ae4e4a11d4300f7448cb6bd170fcb034542caddc

Narrowed down a bit to focus on sd/ directory (Impress & Draw):

git log 4316e643ef345b0f673b4a03a80a4b7cb3185588...ae4e4a11d4300f7448cb6bd170fcb034542caddc sd

Promising mega-commit:
https://git.libreoffice.org/core/commit/44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70

...which contains this very relevant-sounding:
#115962# Better (but not yet optimal, see comments in task) handling of MetaFloatTransparentAction in PDF export