At least on my system, every time I start LibreOffice, the startup time is mostly with the progress bar sitting in the middle & the disk pegged. Checking with strace & gdb, it appears that psp::PrintFontManager::analyzeFontFile is open/mmap/close'ing every font on the system (and read'ing a bunch too).
I had a pspfontcache file in my profile; just to confirm it wasn't corrupt, I deleted it. Even after a few restarts of LibreOffice, it hasn't been regenerated. I went ahead and deleted the entire psprint directory; that was recreated, but is now empty. I have no files name "pspfontcache" anywhere in $HOME.
PS: Not sure why this exists at all — shouldn't all this info be available from fontconfig? But that's surely a different bug, if a bug at all.
It appears pspfontcache was removed in babf6d5e53516e80e8e3f2485796ebfaeb20e9c1 ...
Here, I timed it with a stopwatch, that font scan is ~30s on a cold cache. Even on a warm cache (from immediately closing & re-opening LibreOffice), it's ~20s.
$ fc-list | wc -l
I'm sure that's part of the difference (10x as many fonts), but possibly the author & reviewers have SSDs as well? This machine has HDDs in RAID10, 16GiB RAM, and an i7-3770.
Adding keyword bisected regression.
Need someone to confirm whether is really slows down the starup.
The right fix is to stop calling psp::PrintFontManager::analyzeFontFile at startup and call it only when needed. AFAIK, we only need this information when creating PDF files.
Having a 30s delay to creating PDF files wouldn't be great, either, but it'd be much better than every startup.
I'd guess the information is all available from fontconfig anyway, which already has caches and can provide it basically instantly.
(In reply to Anthony DeRobertis from comment #4)
> Having a 30s delay to creating PDF files wouldn't be great, either, but it'd
> be much better than every startup.
I meant calling it on demand for the fonts we need, not every single font installed on the system.
> I'd guess the information is all available from fontconfig anyway, which
> already has caches and can provide it basically instantly.
I think some of the info needed can be taken from FontConfig, yes, but IIRC not all of them.
Adding Cc: to Khaled Hosny
I'm having the same problem. Startup times of more than 30 seconds are no exception, even though the fonts are located on a SSD.
LibreOffice version 126.96.36.199 (on Arch Linux).
Dear Anthony DeRobertis,
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!
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":
tdf#114192: Speed up populating font list when FontConfig is used
It will be available in 24.2.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:
Affected users are encouraged to test the fix and report feedback.