You are not logged in.

#1 2017-01-12 02:21:04

toxygen
Member
Registered: 2008-08-22
Posts: 713

updating fontconfig cache freezes system

is anyone else experiencing a freeze when updating fonts?  whether a regular update (pacman -Syu) or manual install of a font (pacman -U fontpackage.pkg.tar.gz), my system freezes while updating the font cache for around a minute (or higher if there are many fonts being updated).
my cpu:  Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
6gb ram

:: Running post-transaction hooks...
(1/3) Updating fontconfig cache...

this part is where it get stuck

I have this many fonts:

fc-list | wc -l
477

updating fontconfig has always been a bit slow, but only in the past two weeks or so has it frozen the rest of the system

there's nothing in the log other than the usual pacman messages

Last edited by toxygen (2017-01-12 02:21:53)


"I know what you're thinking, 'cause right now I'm thinking the same thing. Actually, I've been thinking it ever since I got here:
Why oh why didn't I take the BLUE pill?"

Offline

#2 2017-01-12 09:06:35

a821
Member
Registered: 2012-10-31
Posts: 381

Re: updating fontconfig cache freezes system

Did you check if by running "fc-cache" directly the system freezes? I just updated my system (fontconfig included) and it didn't freeze (but it took a bit). FWIW:

$ fc-list | wc -l
1303

Offline

#3 2017-01-12 12:23:41

toxygen
Member
Registered: 2008-08-22
Posts: 713

Re: updating fontconfig cache freezes system

I did, both fc-cache and fc-cache-32, both completed instantly, it only happens with an upgrade or new font installation


"I know what you're thinking, 'cause right now I'm thinking the same thing. Actually, I've been thinking it ever since I got here:
Why oh why didn't I take the BLUE pill?"

Offline

#4 2017-01-12 13:11:21

a821
Member
Registered: 2012-10-31
Posts: 381

Re: updating fontconfig cache freezes system

Did you run it with "--force" or without? I just realized that forgot to tell you that, because you said it ran instantly. It uses "--force" after upgrades, see here.

https://git.archlinux.org/svntogit/pack … fontconfig

Offline

#5 2017-01-13 00:20:15

toxygen
Member
Registered: 2008-08-22
Posts: 713

Re: updating fontconfig cache freezes system

time fc-cache --force

real    0m44.549s
user    0m41.913s
sys     0m0.193s
time fc-cache-32 --force

real    0m48.547s
user    0m46.017s
sys     0m0.180s

since both update at update time for any font, that's over a minute and a half each time


"I know what you're thinking, 'cause right now I'm thinking the same thing. Actually, I've been thinking it ever since I got here:
Why oh why didn't I take the BLUE pill?"

Offline

#6 2017-01-13 00:25:46

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,856
Website

Re: updating fontconfig cache freezes system

Run with the --verbose flag and see where the most time is being spent.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#7 2017-01-13 00:54:14

toxygen
Member
Registered: 2008-08-22
Posts: 713

Re: updating fontconfig cache freezes system

got stuck on

/usr/share/fonts/noto: 

everything else went quick

i have:

extra/noto-fonts 20161221-1
    Google Noto TTF fonts
extra/noto-fonts-cjk 1.004-3
    Google Noto CJK fonts
extra/noto-fonts-emoji 20161020-1
    Google Noto emoji fonts

noto by itself seems ok
noto+noto-cjk - slow
noto+noto-emoji - ok

Packages (1) noto-fonts-cjk-1.004-3

Total Installed Size:  120.17 MiB

that might be why right?


"I know what you're thinking, 'cause right now I'm thinking the same thing. Actually, I've been thinking it ever since I got here:
Why oh why didn't I take the BLUE pill?"

Offline

#8 2017-01-13 02:04:02

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: updating fontconfig cache freezes system

Note that the fontconfig hook only runs "fc-cache -s", without --force. So it won't bog down on every single font.

None of this is new, though -- it used to be in a per-package install script, but the non-forced updates were moved to a hook. If things are unusually slow these days, it is more likely to be an issue with fontconfig itself.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#9 2017-01-13 02:17:21

toxygen
Member
Registered: 2008-08-22
Posts: 713

Re: updating fontconfig cache freezes system

Eschwartz wrote:

So it won't bog down on every single font.

nothing needs to be done user-side for this right? because I sometimes see it run multiple times when there are several font updates


"I know what you're thinking, 'cause right now I'm thinking the same thing. Actually, I've been thinking it ever since I got here:
Why oh why didn't I take the BLUE pill?"

Offline

#10 2017-01-13 03:13:05

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: updating fontconfig cache freezes system

"Something runs multiple times, once for each package" is exactly what hooks are supposed to fix. smile
The hook is automatically installed, and used, by fontconfig. Font packages are responsible for clearing up their obsolete install scripts.

The hook already runs without unnecessary forcing, which is why it won't (shouldn't) bog down on fonts that haven't been updated. I would hope that the (obsolete) install scripts used by various font packages would do the same, but I haven't checked...


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#11 2017-01-13 07:16:55

a821
Member
Registered: 2012-10-31
Posts: 381

Re: updating fontconfig cache freezes system

Eschwartz wrote:

Note that the fontconfig hook only runs "fc-cache -s", without --force. So it won't bog down on every single font.

Ha! you're right, fontconfig was updated 10 hours ago after I posted and doesn't run "fc-cache -f" anymore, but "fc-cache -rs" [1, 2]. And now there is a hook /usr/share/libalpm/hooks/fontconfig.hook which was not present (I had thought there was one in there, but I couldn't find it). I guess this will make things run faster

[1] https://git.archlinux.org/svntogit/pack … fontconfig
[2] https://git.archlinux.org/svntogit/pack … 6c2cdd4980

Offline

Board footer

Powered by FluxBB