Bug 159232 - LibreOffice loads the single variable TTC font (which named Sarasa Gothic) very slowly
Summary: LibreOffice loads the single variable TTC font (which named Sarasa Gothic) ve...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, perf, regression
Depends on:
Blocks: Fonts
  Show dependency treegraph
 
Reported: 2024-01-17 02:06 UTC by Sigmund
Modified: 2024-06-14 05:12 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Strace log when use SuperTTC (4.71 MB, application/x-bzip2)
2024-01-17 02:07 UTC, Sigmund
Details
Strace log when use separate font TTC (1.10 MB, application/x-bzip2)
2024-01-17 02:07 UTC, Sigmund
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sigmund 2024-01-17 02:06:26 UTC
Description:
When LibreOffice start, it needs to read and load the font files. And I tested the font named Sarasa Gothic[https://github.com/be5invis/Sarasa-Gothic/releases/tag/v1.0.3]. In its release pages, there are two kinds of font packages. "Sarasa-SuperTTC-1.0.3.7z" is the single variable TTC font package, and "Sarasa-TTC-1.0.3.7z" is the package which contains the normal separate fonts.

After testing with strace, LibreOffice takes more time (about 2 minutes) to load the font Sarasa-SuperTTC.ttc. However, LibreOffice takes about 15 seconds to load all the separate fonts in package "Sarasa-TTC-1.0.3.7z".

Thus I guessed that LibreOffice might have bugs when it comes to handling single large variable font. And I also created a issue at [https://gitlab.archlinux.org/archlinux/packaging/packages/ttf-sarasa-gothic/-/issues/1].

Steps to Reproduce:
1. Use the superTTC font package [https://github.com/be5invis/Sarasa-Gothic/releases/download/v1.0.3/Sarasa-SuperTTC-1.0.3.7z].
2. Install the font, and use strace to debug LibreOffice.
3. Search the debug log, it shows that it took from 8:50 to 8:52 to load Sarasa-SuperTTC.ttc

Actual Results:
Single large variable font file loads very slowly even though the fonts in two font packages are identical.

Expected Results:
LibreOffice can handle the single variable font files quickly.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: kf5 (cairo+xcb)
Locale: zh-CN (en_US.UTF-8); UI: zh-CN
7.6.4-2
Calc: threaded
Comment 1 Sigmund 2024-01-17 02:07:24 UTC
Created attachment 192007 [details]
Strace log when use SuperTTC
Comment 2 Sigmund 2024-01-17 02:07:56 UTC
Created attachment 192008 [details]
Strace log when use separate font TTC
Comment 3 Buovjaga 2024-01-29 13:30:21 UTC
Confirmed by Toolybird in Arch Gitlab.
Comment 4 Buovjaga 2024-01-29 14:03:14 UTC
I see the slowness in oldest of linux-64-6.1 bibisect repo, but not in oldest of 5.4. Unfortunately, between these I can't run the binaries on my normal system and distrobox does not load the Sarasa fonts, so I can't bibisect.