https://bugs.documentfoundation.org/show_bug.cgi?id=158287
Bug ID: 158287
Summary: Slow startup in presence of iosevka font
Product: LibreOffice
Version: 7.6.2.1 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
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
--
You are receiving this mail because:
You are the assignee for the bug.