Actually when i do a strace on something 'simple' as an eog i get: - 3488 fopen()'s - 4684 stat()'s
A lot of the fopens seem to be caused by the .so linker looking into a lot of places that don't even exist on my system:
open("/usr/X11R6/lib/tls/i686/sse2/libpopt.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/X11R6/lib/tls/i686/libpopt.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/X11R6/lib/tls/sse2/libpopt.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/X11R6/lib/tls/libpopt.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/X11R6/lib/i686/sse2/libpopt.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/X11R6/lib/i686/libpopt.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/X11R6/lib/sse2/libpopt.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/X11R6/lib/libpopt.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/libpopt.so.0", O_RDONLY) = 3
If it would fopen in /usr/lib right away that would save a huge amount of the fopen calls, anyone know why it does such a thing? Would save about 700 fopen calls right away
1091 calls are for /usr/share/fonts/.... Where if i do a "find -type f | wc -l" i have only 539 files; Might be an X 'design flaw' it has to rescan this every time, but it makes having fonts quite expensive :-) I actually nuked most of my extra fonts i used to have (few hundred ttf's) to gain a littlebit of responsiveness again.
About 1288 fopen()'s lead to a ENOENT, just checking for files that _could_ exist (like those weird i686/tls/sse2 dir's and also mucho font subdirs that don't exist like "/usr/share/X11/fonts/Type1/resource.frk"), if we already know what so's we have (ld.so.cache / prelink) and we already know what fonts we have .. Why spend so much time on secondguessing it? Well thats just my feeling, not my technical insight :-)
Anyhow, no i don't think that blog post has caused everything to be changed yet no :-)
-- Chris
On Sun, 2006-01-29 at 00:52 +0100, David Nielsen wrote:
lør, 28 01 2006 kl. 22:59 +0100, skrev Chris Chabot:
Same here, its because it rebuilds the font lists on startup every time. Seems to add many seconds to an otherwise decent boot time :-)
Because i know i'm not adding or removing fonts any time soon i've 'fixed' xfs to: #[ -x /usr/sbin/chkfontpath ] && buildfontlist
(add the # before it to stop it from rebuilding the fontlists every boot, saves tons of time :-))
I thought, reading Dave Jones' blog that this was fixed as a result of his wonderful investigations into the massive insanity that seems to be going on during e.g. boot.
http://kernelslacker.livejournal.com/35270.html
-- Obligatory shameless blog plug - the GNOME commentary located at: www.lovesunix.net/blog