Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow startup due to reading a ton of font configuration files. #14

Open
cizra opened this issue Aug 8, 2023 · 0 comments
Open

Slow startup due to reading a ton of font configuration files. #14

cizra opened this issue Aug 8, 2023 · 0 comments

Comments

@cizra
Copy link

cizra commented Aug 8, 2023

This version of st has a noticeable delay on startup.
strace -ttfo log ./st shows that something like 700 milliseconds is spent on walking through various places where my system stores fonts. Then it probably parses the XML or something.

From my config.h: static char font[] = "Terminus:pixelsize=14:antialias=false:autohint=false";

Here's an excerpt:

87498 22:54:36.287868 getrandom("\x7a\x94\x52\x5f\x6c\xf7\x0c\x4d", 8, 0) = 8
87498 22:54:36.287931 access("/etc/fonts/conf.d/10-yes-antialias.conf", R_OK) = 0
87498 22:54:36.287975 access("/etc/fonts/conf.d/10-yes-antialias.conf", R_OK) = 0
87498 22:54:36.288018 readlink("/etc/fonts/conf.d/10-yes-antialias.conf", "/usr/share/fontconfig/conf.defau"..., 4095) = 56
87498 22:54:36.288065 newfstatat(AT_FDCWD, "/usr/share/fontconfig/conf.default/10-yes-antialias.conf", {st_mode=S_IFREG|0644, st_size=258, ...}, 0) = 0
87498 22:54:36.288112 openat(AT_FDCWD, "/usr/share/fontconfig/conf.default/10-yes-antialias.conf", O_RDONLY|O_CLOEXEC) = 6
87498 22:54:36.288156 read(6, "<?xml version=\"1.0\"?>\n<!DOCTYPE "..., 8192) = 258
87498 22:54:36.288197 read(6, "", 8192) = 0
87498 22:54:36.288233 close(6)          = 0
87498 22:54:36.288271 getrandom("\x15\x42\xe6\xad\x38\x3c\xff\x4c", 8, 0) = 8
87498 22:54:36.288325 access("/etc/fonts/conf.d/11-lcdfilter-default.conf", R_OK) = 0
87498 22:54:36.288372 access("/etc/fonts/conf.d/11-lcdfilter-default.conf", R_OK) = 0
87498 22:54:36.288418 readlink("/etc/fonts/conf.d/11-lcdfilter-default.conf", "/usr/share/fontconfig/conf.defau"..., 4095) = 60
87498 22:54:36.288469 newfstatat(AT_FDCWD, "/usr/share/fontconfig/conf.default/11-lcdfilter-default.conf", {st_mode=S_IFREG|0644, st_size=695, ...}, 0) = 0
87498 22:54:36.288518 openat(AT_FDCWD, "/usr/share/fontconfig/conf.default/11-lcdfilter-default.conf", O_RDONLY|O_CLOEXEC) = 6
87498 22:54:36.288562 read(6, "<?xml version=\"1.0\"?>\n<!DOCTYPE "..., 8192) = 695
87498 22:54:36.288605 read(6, "", 8192) = 0
87498 22:54:36.288650 close(6)          = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant