void-linux / xbps

The X Binary Package System (XBPS)
https://voidlinux.org/xbps/
Other
821 stars 124 forks source link

Optimize "Updating fontconfig's cache..." #551

Closed thetredev closed 1 year ago

thetredev commented 1 year ago

Hi,

I have a couple of fonts installed and each time they get updated, xbps will update fontconfig's cache after each single package. Like so:

font-sil-mingzat-1.100_1: installed successfully.
font-sil-padauk-5.001_1: configuring ...
Building /usr/share/fonts/SIL/fonts.dir...
Building /usr/share/fonts/SIL/fonts.scale...
Updating fontconfig's cache...
font-sil-padauk-5.001_1: installed successfully.
font-sil-tai-heritage-pro-2.600_2: configuring ...
Building /usr/share/fonts/SIL/fonts.dir...
Building /usr/share/fonts/SIL/fonts.scale...
Updating fontconfig's cache...
font-sil-tai-heritage-pro-2.600_2: installed successfully.
google-fonts-ttf-20230317_2: configuring ...
Building /usr/share/fonts/TTF/fonts.dir...
Building /usr/share/fonts/TTF/fonts.scale...
Updating fontconfig's cache...

Independently of whether I actually need those fonts or not, I think updating that cache could be optimized by watching all font-related package updates via a queue or something and then only updating the cache once all the packages from that queue have been updated/installed. What do you think?

classabbyamp commented 1 year ago

the proper way to fix this is a proper hooks system, see #64, #304

thetredev commented 1 year ago

@classabbyamp thanks! Didn't think of looking for those. Closing this issue.