Bug#997071: mate-font-viewer: Shows empty content for very long time
Package: mate-control-center
Version: 1.24.1-1+b1
Severity: normal
File: /usr/bin/mate-font-viewer
X-Debbugs-Cc: witold.baryluk@gmail.com
Initially I was thinking mate font viewer is completly broken. Launching
it on my desktop will show empty content, with just menu bar, and "All
Fonts", but no fonts would show up at all. No messages when running in a
terminal.
However, it looks it is just extremally slow. Launching it and leaving
for about 30 seconds, some fonts starts showing up, but then it takes
another 2-3 minutes until the preview of even the first 12 fonts loads
(the ones initially on screen).
Possible improvements:
1) When loading font list itself, show the spinner, with progress indicator.
I do not know why mate font viewer takes so long, as initial list can be retrived
from fontconfig in about 40ms on my computer.
2) When loading font previews, be faster.
3) Load multiple font previews in parallal (I have 16 cores, 32 cores,
and extremally fast IO 4GB/s+, doh).
4) When loading font previews, priotize the ones that are in the current view of
the scroll area. Right now font preview loads them almost randomly.
5) Cache previews on disk (i.e. as PNG file), so the future loads are
faster. The cache can be validated asynchronously against the
modification time of the font, or the hash of its content. Right now
starting font viewer, it needs to go through whole slow ordeal again. (It
is faster on second run, possibly due to the kernel file cache being
warmed up, but still slow. Not 1 minute, but still too slow for what it
is supposed to do).
PS.
$ time fc-list | wc -l
3596
real 0m0.042s
user 0m0.043s
sys 0m0.000s
$
-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.14.0-2-amd64 (SMP w/32 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages mate-control-center depends on:
ii caja-common 1.24.0-1
ii desktop-file-utils 0.26-1
ii gsettings-desktop-schemas 41.0-1
ii libaccountsservice0 0.6.55-3
ii libc6 2.32-4
ii libcairo-gobject2 1.16.0-5
ii libcairo2 1.16.0-5
ii libcanberra-gtk3-0 0.30-8
ii libcanberra0 0.30-8
ii libdbus-glib-1-2 0.112-2
ii libdconf1 0.40.0-2
ii libfontconfig1 2.13.1-4.2
ii libfreetype6 2.11.0+dfsg-1
ii libgdk-pixbuf-2.0-0 2.42.6+dfsg-2
ii libglib2.0-0 2.70.0-1+b1
ii libglib2.0-bin 2.70.0-1+b1
ii libgtk-3-0 3.24.30-3
ii libmarco-private2 1.24.1-3
ii libmate-desktop-2-17 1.24.1-2
ii libmate-slab0 1.24.1-1+b1
ii libmate-window-settings1 1.24.1-1+b1
ii libmatekbd4 1.24.1-1+b1
ii libpango-1.0-0 1.48.10+ds1-1
ii libpangocairo-1.0-0 1.48.10+ds1-1
ii libpolkit-gobject-1-0 0.105-31
ii libx11-6 2:1.7.2-2+b1
ii libxcursor1 1:1.2.0-2
ii libxi6 2:1.8-1
ii libxklavier16 5.4-4
ii libxml2 2.9.12+dfsg-5
ii libxss1 1:1.2.3-1
ii marco-common 1.24.1-3
ii mate-control-center-common 1.24.1-1
ii mate-desktop 1.24.1-2
ii mate-icon-theme 1.24.0-1
ii mate-menus 1.24.1-1
ii mate-settings-daemon 1.24.1-1+b1
mate-control-center recommends no packages.
Versions of packages mate-control-center suggests:
pn gconf2 <none>
-- no debconf information
Reply to: