You are not logged in.

#1 2016-09-17 04:53:25

devoted
Member
Registered: 2016-09-17
Posts: 3

Dmenu incredibly slow

Demnu seems to index every single font before loading for the first time after cold boot. My computer freezes for a few minutes while it indexes hundreds of fonts. Is there any way to prevent this?

Offline

#2 2016-09-17 05:43:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Dmenu incredibly slow

Why is dmenu indexing your fonts?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-09-24 07:22:26

devoted
Member
Registered: 2016-09-17
Posts: 3

Re: Dmenu incredibly slow

No idea, it seems that it's searching in every single font file before showing at the top of the screen and locking all activity while it searches. Computer becomes unresponsive when invoking dmenu after suspend or after first boot.

Example strace:

munmap(0x7f915505d000, 59436)           = 0
stat("/home/don/.local/share/fonts/Agatha-Regular.ttf", {st_mode=S_IFREG|0644, st_size=46668, ...}) = 0
open("/home/don/.local/share/fonts/Agatha-Regular.ttf", O_RDONLY) = 5
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
fstat(5, {st_mode=S_IFREG|0644, st_size=46668, ...}) = 0
mmap(NULL, 46668, PROT_READ, MAP_PRIVATE, 5, 0) = 0x7f9155060000
close(5)                                = 0
munmap(0x7f9155060000, 46668)           = 0
stat("/home/don/.local/share/fonts/AgincourtPlain-Regular.ttf", {st_mode=S_IFREG|0644, st_size=113528, ...}) = 0
open("/home/don/.local/share/fonts/AgincourtPlain-Regular.ttf", O_RDONLY) = 5
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
fstat(5, {st_mode=S_IFREG|0644, st_size=113528, ...}) = 0
mmap(NULL, 113528, PROT_READ, MAP_PRIVATE, 5, 0) = 0x7f9155050000
close(5)                                = 0
munmap(0x7f9155050000, 113528)          = 0
stat("/home/don/.local/share/fonts/Ahnberg-Regular.ttf", {st_mode=S_IFREG|0644, st_size=34368, ...}) = 0
open("/home/don/.local/share/fonts/Ahnberg-Regular.ttf", O_RDONLY) = 5

Goes on for thousands of lines like this.

Last edited by devoted (2016-09-24 07:23:08)

Offline

#4 2016-09-24 07:29:46

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Dmenu incredibly slow

dmenu just reads your $PATH; to refine my first question, why are your fonts in your $PATH?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2016-09-24 08:07:23

Vain
Member
Registered: 2008-10-19
Posts: 183

Re: Dmenu incredibly slow

dmenu uses fontconfig and fontconfig scans available fonts when it starts up. However, it usually maintains a cache which drastically speeds up that process. That cache is stored in /var/cache/fontconfig and/or ~/.fontconfig (as far as I know), maybe also ~/.cache/fontconfig.

Running "fc-cache -v" (as your user) or "fc-cache -f" (as root) might help.

Offline

Board footer

Powered by FluxBB