Bug 165190 - images_karasa_jaga_svg.zip file is too large
Summary: images_karasa_jaga_svg.zip file is too large
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0
Keywords:
Depends on:
Blocks: Win-Installer-Smaller Installer-Linux Icon-Theme-KarasaJaga
  Show dependency treegraph
 
Reported: 2025-02-11 10:18 UTC by Gabor Kelemen (allotropia)
Modified: 2025-03-15 15:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
list of svgs with identical md5 (205.00 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-02-11 11:39 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2025-02-11 10:18:58 UTC
When looking at the install directory in my SIGUI\LibreOfficeDev\share\config 
I noticed that mostly the icon theme zip files are between 2-5 megabytes, but images_karasa_jaga_svg.zip is about 16.

It would be probably useful to try reduce the size of images in this package, shrinking the overall installer sizes.

One obvious issue is that some larger images contain a binary jpeg/png image, probably this is not really needed:

$ git grep -l "data:image" icon-themes/ | xargs ls -lh
-rwxr-xr-x+ 1 Gabor None 512K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/32/addressbooksource.svg
-rwxr-xr-x+ 1 Gabor None 175K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/32/currencyfield.svg
-rwxr-xr-x+ 1 Gabor None 384K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/32/documentation.svg
-rwxr-xr-x+ 1 Gabor None 500K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/lc_addressbooksource.svg
-rwxr-xr-x+ 1 Gabor None 186K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/lc_changepicture.svg
-rwxr-xr-x+ 1 Gabor None 200K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/lc_currencyfield.svg
-rwxr-xr-x+ 1 Gabor None 384K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/lc_documentation.svg
-rwxr-xr-x+ 1 Gabor None  56K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/lc_sbaexecutesql.svg
-rwxr-xr-x+ 1 Gabor None 565K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/sc_addressbooksource.svg
-rwxr-xr-x+ 1 Gabor None  11K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/sc_bezierappend.svg
-rwxr-xr-x+ 1 Gabor None 8,0K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/sc_bezierinsert.svg
-rwxr-xr-x+ 1 Gabor None 143K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/sc_currencyfield.svg
-rwxr-xr-x+ 1 Gabor None 385K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/sc_documentation.svg
-rwxr-xr-x+ 1 Gabor None 114K febr.  10 16.57 icon-themes/karasa_jaga_svg/cmd/sc_showlicense.svg
-rwxr-xr-x+ 1 Gabor None 2,6K febr.  10 16.57 icon-themes/karasa_jaga_svg/wizards/res/portrait_32.svg

Hopefully there are other ways to reduce the file sizes in this package.

The images_karasa_jaga_svg.zip was always similarly large since its introduction in 6.4, so this is not a recent regression.
Comment 1 Gabor Kelemen (allotropia) 2025-02-11 11:39:00 UTC
Created attachment 199137 [details]
list of svgs with identical md5

I have checked out whether there are duplicated files, and indeed there are some.

This may or may not be normal, I don't know enough about icon theming.
Comment 2 Buovjaga 2025-02-11 20:24:17 UTC
Done already last year.

*** This bug has been marked as a duplicate of bug 158939 ***
Comment 3 Buovjaga 2025-02-11 20:27:51 UTC
Well, let's open this anyway as the size *is* still large even though the bitmap issues mentioned in comment 0 were dealt with.
Comment 4 Jérôme 2025-02-11 21:12:04 UTC
For example, just the below image is 654KiB and it still require 176KiB once compressed in zip :
sfx2/res/128x128_writer_doc-p.svg

There are also :
res/ott_48_8.svg
res/odt_48_8.svg
res/ott_96_8.svg
Comment 5 Buovjaga 2025-02-12 06:05:03 UTC
(In reply to Jérôme from comment #4)
> For example, just the below image is 654KiB and it still require 176KiB once
> compressed in zip :
> sfx2/res/128x128_writer_doc-p.svg

Each of the icons would need to be carefully analysed and their design tweaked. In the case of this icon, it has multiple lines of text *as a shape*, which of course means lots and lots of vertex data. Deleting the text shape in Inkscape and running svgcleaner, the size drops to 121.5 KiB uncompressed.

In general, the theme has lots of detail, which is only properly seen in higher resolution. In my tweaks as part of bug 158939 I sometimes got rid of such detail, replacing it with something simpler that looks identical in low resolution.

About the mentioned duplication of files, I'm not sure if the links.txt system would solve it, but I only see links.txt files in bitmap versions of the icon themes. I don't know enough about how this works.
Comment 6 Commit Notification 2025-02-27 07:43:52 UTC
Ilmari Lauhakangas committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5440abe0520404709b62679041fb2f3681e6ae6f

tdf#165190 Karasa Jaga: simplify 128x128_writer_doc-p.svg

It will be available in 25.8.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 Jérôme 2025-03-15 15:11:36 UTC
On master, there are also similar images below which could have the same simplification :
$ find icon-themes/karasa_jaga_svg/ -size +520k
icon-themes/karasa_jaga_svg/res/ott_96_8.svg
icon-themes/karasa_jaga_svg/res/ott_48_8.svg
icon-themes/karasa_jaga_svg/res/odt_48_8.svg
$