Bug 121721 - GTK3: super slow xor mode used for slideshow gradients
Summary: GTK3: super slow xor mode used for slideshow gradients
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0 target:6.2.0.1
Keywords: bibisected, regression
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2018-11-26 15:16 UTC by Xisco Faulí
Modified: 2020-05-04 15:44 UTC (History)
4 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 Xisco Faulí 2018-11-26 15:16:15 UTC
Steps to reproduce:
1. Open attachment 147051 [details] from bug 121719
2. Start slide show

-> it hangs for 10 seconds before the presentation is displayed

Reproduced in

Version: 6.2.0.0.beta1+
Build ID: a63cd8bbe7cf881daa8dc7a7f32f3e5ac384e902
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Xisco Faulí 2018-11-26 15:18:53 UTC
Regression introduced in range https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=aa6c54f337a616c9ca6a39cfc8708657018d8613..bd503faaf61943f25be46bb540023f15606a106a

@Caolán, I see some cairo work in the range. Wondering if it's related...
Comment 2 Durgapriyanka 2018-11-26 16:18:28 UTC
Can not reproduce in 

Version: 6.0.6.2
Build ID: 0c292870b25a325b5ed35f6b45599d2ea4458e77
CPU threads: 2; OS: Windows 6.1; UI render: default; 
Locale: en-US (en_US); Calc: group
Comment 3 Xavier Van Wijmeersch 2018-11-27 07:38:25 UTC
confirm with

Version: 6.3.0.0.alpha0+
Build ID: 74d6476a045ff2cad36deac51228712d992fb98b
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: nl-BE (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 4 Caolán McNamara 2018-11-27 11:14:12 UTC
Its probably the RasterOp::Xor in OutputDevice::ClipAndDrawGradientMetafile
xor is kryptonite for the cairo rendering
Comment 5 Caolán McNamara 2018-11-27 12:52:55 UTC
yeah, its that gradient XOR. I can at least parallelize our xor-in-cairo hack with https://gerrit.libreoffice.org/#/c/64111/ which will make it faster, depending on the number of threads available, but maybe alg knows a better way to tease the drawinglayer down a different path that avoids that xor in the first place ?
Comment 6 Commit Notification 2018-12-01 19:11:55 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/da0afa5ac2b69bcb4b19ec4dd096d7b3f1e50fc9%5E%21

Related: tdf#121721 use premultiply unpremultiply tables

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2018-12-01 21:39:27 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/0aaebad112a2d877450133b737c5b08bf8b2387d%5E%21

Related: tdf#121721 use premultiply unpremultiply tables

It will be available in 6.2.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Caolán McNamara 2018-12-06 10:40:18 UTC
caolanm->xisco: how do you find the timing now ?
Comment 9 Xisco Faulí 2018-12-06 12:25:51 UTC
it takes  5'45 seconds in

Version: 6.3.0.0.alpha0+
Build ID: fcc76610649a9830859f9e2efe2a06dbc6db74da
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

while in

Versió: 6.1.3.2
ID de la construcció: 1:6.1.3~rc2-0ubuntu0.16.04.1
Fils de CPU: 4; SO: Linux 4.15; Renderitzador de la IU: per defecte; VCL: gtk3; 
Configuració local: ca-ES (ca_ES.UTF-8); Calc: group threaded

it takes ~10 seconds

so it's around 50% faster in master...
Comment 10 Telesto 2020-05-03 21:26:55 UTC
FIXED?
Comment 11 Caolán McNamara 2020-05-04 15:44:58 UTC
probably not, we need to avoid xoring stuff, there was a proposal IIRC in this years tenders to address getting rid of xoring stuff maybe this would fall under that and if it happened make this better