Bug 129816 - Impress with HW ACC very slowly loads EMF, Skia requires 2 clicks to advance
Summary: Impress with HW ACC very slowly loads EMF, Skia requires 2 clicks to advance
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks:
 
Reported: 2020-01-05 20:37 UTC by Timur
Modified: 2022-11-11 05:06 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 Timur 2020-01-05 20:37:45 UTC
3-slide PPTX attachment 156822 [details] from bug 129675 has EMF in slide 3.
There's bug with OpenGL (HW-ACC regardless):
If I wait enough with just one click on slide 2 and not click again to advance slide, I may see slide 3.
But if I click normally to advance, I don't come to see it in normal time and presentation ends.
Seems to have started in 6.0, was good in 5.4.7, so I add bibisectRequest.

Note: original PPTX is attachment 156821 [details] and trouble slide is 20 there.
Comment 1 Telesto 2020-01-12 15:57:38 UTC
The EMF on the third sheet loads very slowly. This started with
author	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2017-08-21 22:44:30 +0200
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2017-08-22 12:28:57 +0200
commit ebc11ae0b132eefd3b1b1a837a8d0ad3ba73b460 (patch)
tree 599ae51a0a42b111f245697e7ad86b7f85681798
parent a3782f1152e4cf02f30003b5f96c7ba603a87db9 (diff)
emfplus: cut over to new EMF+ renderer
We're on par with the old functionality now (modulo a few smaller
issues); overall QoS is much better, we get vector output on pdf
and print, and the need for large offscreen bitmap rendering goes
away.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=ebc11ae0b132eefd3b1b1a837a8d0ad3ba73b460

However the quality of the rendering of sheet 3 is quite bad before the commit
Comment 2 Telesto 2020-01-12 15:58:31 UTC
@Julien
A perf graph would be nice. If reproducible on Linux with OpenGL
Comment 3 Julien Nabet 2020-01-12 16:05:30 UTC
OpenGL is disabled for me.
Comment 4 V Stuart Foote 2020-01-12 16:48:48 UTC
The EMF+ graphic causing issues is available as attachment 156837 [details] from bug 129675, is it really an Impress issue here? Of just graphics stack for the EMF+?

Kind of seems this is a dupe of bug 129675

A WinDbg trace (master at 6.4 branch) just opening the EMF+ shows it chews memory parsing a dashed line:

0a 00000071`0eb8c8e0 00007fff`7bc6ea07 ucrtbase!_malloc_base+0x36
0b 00000071`0eb8c910 00007fff`795da256 mergedlo!xstor_component_getFactory+0x1af287
0c 00000071`0eb8c940 00007fff`795d874e mergedlo!basegfx::B2DPolygon::operator!=+0x616
0d 00000071`0eb8c970 00007fff`795df63f mergedlo!basegfx::utils::createAreaGeometryForLineStartEnd+0x379e
0e 00000071`0eb8c9b0 00007fff`795db619 mergedlo!basegfx::B2DPolygon::setNextControlPoint+0x19f
0f 00000071`0eb8ca00 00007fff`795eaece mergedlo!basegfx::B2DPolygon::appendBezierSegment+0x1a9
10 00000071`0eb8ca90 00007fff`79a07c64 mergedlo!basegfx::utils::applyLineDashing+0x36e
11 00000071`0eb8cc70 00007fff`799ebfb6 mergedlo!drawinglayer::primitive2d::PolygonStrokePrimitive2D::create2DDecomposition+0xe4
12 00000071`0eb8cd80 00007fff`79a3d7db mergedlo!drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition+0xa6
Comment 5 Timur 2020-01-13 16:22:12 UTC
(In reply to V Stuart Foote from comment #4)
> Kind of seems this is a dupe of bug 129675
Yes, now with your explanation. I opened it when that one was closed. Let's wait and see what's gonna happen there.
Comment 6 V Stuart Foote 2020-01-13 16:49:30 UTC
@Chris, seems like your call. If you'd like to close this and concentrate on bug 129675 (revisiting basegfx, and bringing in other EMF+ hands) think that would be fine. Stuart
Comment 7 Buovjaga 2020-08-28 13:11:12 UTC
Timur: are you able to test with Skia/Vulkan?
Comment 8 Timur 2020-11-10 09:30:56 UTC
Linux Skia 7.1+ with SAL_ENABLESKIA=1 SAL_USE_VCLPLUGIN=gen: 
somewhat slow 3rd slide, like 3 secs, but seen.
Linux without OpenGL or Skia, with or without HW ACC: same as with Skia. 
I tested also with EMF_PLUS_DISABLE=1 and it's fast so EMF+ is worse here. 

Windows Skia 7.1+: to load 3rd slide and to exit presentation, actually it takes 2 clicks both, I don't know why. 
Windows GDI/no Skia and no HW ACC: 3rd slide just takes a second more, so it's not ideal, but is acceptable. 
Windows GDI with HW ACC: 3rd slide takes 10 seconds to load and 6 to exit.

My conclusion: 
- load in Lin is same with all options and acceptable, but it's worse with default EMF+ than without. 
- load in Win is very slow with Hardware Acceleration and strange requiring 2-clicks with Skia. 

So this should be kept open. I don't have Vulkan.
Comment 9 QA Administrators 2022-11-11 03:56:28 UTC Comment hidden (obsolete)
Comment 10 V Stuart Foote 2022-11-11 05:06:31 UTC
No speed issues opening, or running presentation with Skia raster, or Vulkan rendering.  

Performance issues seem to WFM, as was see also bug 129675

Test doc attachment 156822 [details] shows weird handling of the EMF between the presentation console and the actual slide show canvas, which I think is bug 130478

For the 3 slide presentation--rendering quality of the gradient fills of the maps and for the dashed arc lines *differs* between renderings GDI+, CPU HA, Skia raster, Skia Vulkan. Including the "next slide" preview using different render path to the current slide and actual presentation--where both the Skia lib based modes drop lines in the gradient. And where CPU HA does not dash the arcs. 

=-testing-=

Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 07d303b74108debc9e2b9855a49d69bf156a91a9
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded