Bug 158287 - Slow startup in presence of iosevka font (FreeBSD & Gentoo)
Summary: Slow startup in presence of iosevka font (FreeBSD & Gentoo)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.6.2.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: Fonts
  Show dependency treegraph
 
Reported: 2023-11-20 17:47 UTC by Dmitry Marakasov
Modified: 2025-11-30 03:16 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
full ktrace (4.28 MB, application/x-xz)
2023-11-30 12:51 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov 2023-11-20 17:47:50 UTC
I'm experiencing slow startup times on core i7-6600U laptop for both lowriter and localc. System is FreeBSD 13.2 and libreoffice is 7.6.2.1. After doing some tracing with FreeBSD ktrace tool, it turned out that what slows it down is openning font (iosevka in this case) files thousands of times. Here's an excerpt form kdump output:

```
 56210 soffice.bin CALL  openat(AT_FDCWD,0x898551f08,0<O_RDONLY>)
 56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka.ttc"
 56210 soffice.bin RET   openat 24/0x18
 56210 soffice.bin CALL  fstat(0x18,0x821158f60)
 56210 soffice.bin STRU  struct stat {dev=6602381364165455651, ino=853229, mode=0100644, nlink=1, uid=0, gid=0, rdev=18446744073709551615, atime=1700500430.680679000, mtime=1700500431.123096000, ctime=1700500463.811403000, birthtime=1700500431.123096000, size=261945172, blksize=131072, blocks=205593, flags=0x800 }
 56210 soffice.bin RET   fstat 0
 56210 soffice.bin CALL  mmap(0,0xf9cf754,0x1<PROT_READ>,0x1<MAP_SHARED>,0x18,0)
 56210 soffice.bin RET   mmap 38558236672/0x8fa400000
 56210 soffice.bin CALL  close(0x18)
 56210 soffice.bin RET   close 0
 56210 soffice.bin CALL  munmap(0x8fa400000,0xf9cf754)
 56210 soffice.bin RET   munmap 0
```

it can be seen that it opens and then closes iosevka font file, but this repeats several thousand times for each font file:

```
% kdump | grep NAMI | grep iosevka | sort | uniq -c                                                                                                                       1
 783  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-aile.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-curly-slab.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-curly.ttc"
 783  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-etoile.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-slab.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss01.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss02.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss03.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss04.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss05.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss06.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss07.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss08.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss09.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss10.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss11.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss12.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss13.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss14.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss15.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss16.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss17.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka-ss18.ttc"
26568  56210 soffice.bin NAMI  "/usr/local/share/fonts/Iosevka/iosevka.ttc"
```

There's definitely something going wrong here. Removing iosevka font expectendly fixes slow startup.

- Full kdump output: https://people.freebsd.org/~amdmi3/libreoffice.ktrace.txt.xz
- FreeBSD bug report https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275218
- Similar Gentoo report I've run into: https://forums.gentoo.org/viewtopic-p-8807292.html
Comment 1 Buovjaga 2023-11-30 12:50:51 UTC
NEW per https://forums.gentoo.org/viewtopic-p-8807292.html

I don't reproduce the slow startup myself after installing https://archlinux.org/packages/extra/any/ttc-iosevka/

Arch Linux 64-bit, X11
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
7.6.2-3
Calc: threaded
Comment 2 Buovjaga 2023-11-30 12:51:23 UTC
Created attachment 191142 [details]
full ktrace
Comment 3 QA Administrators 2025-11-30 03:16:11 UTC
Dear Dmitry Marakasov,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug