Bug 129224 - About dialog slow to open because of SVG images with encapsulated PNG
Summary: About dialog slow to open because of SVG images with encapsulated PNG
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.0.4.2 release
Hardware: All All
: medium trivial
Assignee: Heiko Tietze
URL:
Whiteboard:
Keywords: bisected, perf, regression
Depends on:
Blocks: About-Dialog
  Show dependency treegraph
 
Reported: 2019-12-06 08:49 UTC by Thomas Bertels
Modified: 2019-12-09 11:33 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Optimized about dialog SVG file (fully vectorized) (96.34 KB, image/svg+xml)
2019-12-06 08:51 UTC, Thomas Bertels
Details
About dialog SVG file without the PNG encapsulation (269.65 KB, image/svg+xml)
2019-12-06 09:09 UTC, Thomas Bertels
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bertels 2019-12-06 08:49:52 UTC
Description:
When we open the about dialog, there is a noticeable delay before it shows up.

This is caused by slow SVG file (probably because of the encapsulated PNG file).

This issue was created with the new image for LibreOffice 5.0 (https://cgit.freedesktop.org/libreoffice/core/commit/icon-themes/galaxy/brand/flat_logo.svg?id=8cfdd81b70ef37927b40497ffd10034f28335034)

It got better with LibreOffice 6.0 but is still not fixed.

Steps to Reproduce:
1. Start any LibreOffice application, e.g. Writer
2. Click "Help"
3. Click "About LibreOffice"

Actual Results:
Noticeable delay until the dialog shows up

Expected Results:
Dialog shows up almost instantly


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Thomas Bertels 2019-12-06 08:51:47 UTC
Created attachment 156345 [details]
Optimized about dialog SVG file (fully vectorized)

Here's an optimized version of the SVG file that slows down the about dialog.

Note that the encapsulated PNG file has been replaced by a proper vector version.

Optimized using https://kraken.io/web-interface
Comment 2 Thomas Bertels 2019-12-06 08:53:20 UTC
Note that replacing the current SVG file by attachment 156345 [details] fixes this bug.
Comment 3 Roman Kuznetsov 2019-12-06 08:55:56 UTC
Xisco, possibly you'll be interrested in this
Comment 4 Thomas Bertels 2019-12-06 09:09:08 UTC
Created attachment 156346 [details]
About dialog SVG file without the PNG encapsulation

I found out that the encapsulated PNG file is both for sure the culprit and unused. So here's a version without it that fixes the bug while still being legible.
Comment 5 Mike Kaganski 2019-12-06 09:25:22 UTC
So two problems here: 1. Cleanup the SVG to have clean images without unused bloat in distribution; 2. Bad performance when SVG has embedded PNGs (a problem on its own).

#1 is the problem that should be tracked here; #2 needs own issue.

(In reply to Roman Kuznetsov from comment #3)
> Xisco, possibly you'll be interrested in this

I suppose that it's OP - Thomas Bertels - who should take the credit for all the hard work on both noticing the bug, finding the problem, and *providing the fix*. Thomas: please post your fixed SVG as a patch to gerrit if you can! (Otherwise we'll still post it, mentioning you as author - but you as both author and committer is preferable.) Thank you very much!

https://wiki.documentfoundation.org/Development/gerrit
Comment 6 Thomas Bertels 2019-12-06 09:43:00 UTC
For the record, on my computer it takes 700 ms with the current SVG file and 133 ms with both attachment 156345 [details] (optimized) and attachment 156346 [details] (same as the original one without the useless encapsulated PNG).
Comment 7 Thomas Bertels 2019-12-06 09:45:13 UTC
(In reply to Mike Kaganski from comment #5)

I'd much rather someone else who has everything already set up to post it.
Comment 8 Thomas Bertels 2019-12-07 13:06:59 UTC
This should actually have been fixed by https://cgit.freedesktop.org/libreoffice/core/commit/icon-themes/colibre/brand/flat_logo.svg?id=60413c9800c27f53c1108015b50754b065bc98c6 on 2018-05-05.

The galaxy icon theme isn't on the tree since 6.1 https://cgit.freedesktop.org/libreoffice/core/tree/icon-themes?h=libreoffice-6-1 so how come this old SVG branding file is still used anyway?

Maybe Heiko could shed some light.
Comment 9 QA Administrators 2019-12-08 03:46:26 UTC Comment hidden (obsolete)
Comment 10 Heiko Tietze 2019-12-08 11:41:41 UTC
(In reply to Thomas Bertels from comment #8)
> The galaxy icon theme isn't on the tree since 6.1
> https://cgit.freedesktop.org/libreoffice/core/tree/icon-themes?h=libreoffice-
> 6-1 so how come this old SVG branding file is still used anyway?
> 
> Maybe Heiko could shed some light.

Well, we don't have a maintainer for Galaxy, it's an outdated icon theme, and it is succeeded by alternatives.

> This should actually have been fixed by
> https://cgit.freedesktop.org/libreoffice/core/commit/icon-themes/colibre/
> brand/flat_logo.svg?id=60413c9800c27f53c1108015b50754b065bc98c6 on
> 2018-05-05.

So resolve as WFM?
Comment 11 Thomas Bertels 2019-12-08 13:14:24 UTC
(In reply to Heiko Tietze from comment #10)

Galaxy doesn't seem to be on the tree, yet its SVG branding file "flat_logo.svg" is still used by LibreOffice >6.0 hence this reproducible bug.

Is there any reason for that?
Comment 12 QA Administrators 2019-12-09 03:40:29 UTC Comment hidden (obsolete)
Comment 13 Heiko Tietze 2019-12-09 09:37:58 UTC
(In reply to Thomas Bertels from comment #11)
> Galaxy doesn't seem to be on the tree, yet its SVG branding file
> "flat_logo.svg" is still used by LibreOffice >6.0 hence this reproducible
> bug.

I don't see any Galaxy in the sources. And the branding comes from Colibre.

find . -name flat_logo.svg
./icon-themes/colibre/brand/flat_logo.svg
./instdir/program/flat_logo.svg
Comment 14 Mike Kaganski 2019-12-09 09:45:04 UTC
(In reply to Heiko Tietze from comment #13)

It doesn't make sense to argue around technical aspects, when there's a problem that our distribution package does include wrong (?) file, despite it should (?) include a different one.

I confirm, that e.g. LibreOffice_6.3.4.1_Win_x64.msi from https://dev-builds.libreoffice.org/pre-releases/win/x86_64/ does contain flat_logo.svg with size 434594 bytes, and with embedded data:image/png stream, while flat_logo.svg in https://opengrok.libreoffice.org/xref/core/icon-themes/colibre/brand/ is only 67.3 KiB.

Why is that is the actual problem that needs solving here.
Comment 15 Heiko Tietze 2019-12-09 09:51:38 UTC
(In reply to Mike Kaganski from comment #14)
> I confirm, that e.g. LibreOffice_6.3.4.1_Win_x64.msi from
> https://dev-builds.libreoffice.org/pre-releases/win/x86_64/ does contain
> flat_logo.svg with size 434594 bytes...

Okay, no idea then. The flat_logo.svg on my local build is the same as on the sources. Any idea, Cloph?
Comment 16 Christian Lohmaier 2019-12-09 10:45:37 UTC
TDF provided builds use --with-branding switch to use the logo variants with the "The Document Foundation" tagline - the versions in source are the plain libreoffice ones.

Thx for providing a fixed copy, I'll use that for future builds (6.3.5 / 6.4.0)
Comment 17 Heiko Tietze 2019-12-09 11:33:41 UTC
Sent an optimized image to the build manager.