Mike FABIAN
2006-Feb-10 09:44 UTC
[Fontconfig] performance patch: reduce stat () call if all cache files can be trusted
Takashi IWAI <tiwai@suse.de> made a patch to reduce the amount of stat () calls in the case when one is absolutely sure that all cache files are OK and up-to-date and can be trusted. For details see http://bugzilla.novell.com/show_bug.cgi?id=148361 from comment #20 on. There are problems if the cache files are not correct of course, but nevertheless Takashi''s patch might be a useful performance hack if a user is able to make sure that all cache files can be trusted. -------------- next part -------------- A non-text attachment was scrubbed... Name: fc-validatecache-option.diff Type: text/x-patch Size: 4114 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20060210/ea88726a/fc-validatecache-option.bin -------------- next part -------------- -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian ?????????????
Patrick Lam
2006-Feb-10 11:56 UTC
[Fontconfig] Re: performance patch: reduce stat () call if all cache files can be trusted
Mike FABIAN wrote:> Takashi IWAI <tiwai@suse.de> made a patch to reduce the amount of stat > () calls in the case when one is absolutely sure that all cache files > are OK and up-to-date and can be trusted. > > For details see > > http://bugzilla.novell.com/show_bug.cgi?id=148361 > > from comment #20 on. > > There are problems if the cache files are not correct of course, > but nevertheless Takashi''s patch might be a useful performance hack > if a user is able to make sure that all cache files can be trusted.This bug is not publicly readable. Doesn''t it tend to be a bad idea to trust cache files, in that it causes a pretty annoying failure mode? How much performance can we potentially gain? pat
Mike FABIAN
2006-Feb-10 12:28 UTC
[Fontconfig] Re: performance patch: reduce stat () call if all cache files can be trusted
Patrick Lam <plam@MIT.EDU> ????????:> Mike FABIAN wrote: >> Takashi IWAI <tiwai@suse.de> made a patch to reduce the amount of stat >> () calls in the case when one is absolutely sure that all cache files >> are OK and up-to-date and can be trusted. >> >> For details see >> >> http://bugzilla.novell.com/show_bug.cgi?id=148361 >> >> from comment #20 on. >> >> There are problems if the cache files are not correct of course, >> but nevertheless Takashi''s patch might be a useful performance hack >> if a user is able to make sure that all cache files can be trusted. > > This bug is not publicly readable.I changed something to make it publicly readable just now. -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian ?????????????
Patrick Lam
2006-Feb-10 15:12 UTC
[Fontconfig] Re: performance patch: reduce stat () call if all cache files can be trusted
Takashi Iwai wrote:> However, such an option might be helpful for almost read-only sytems > like thin clients.It sounds like you''d want to merge all config files into one on a thin client to get this perf gain without adding unsafe options. pat
Patrick Lam
2006-Feb-10 20:41 UTC
[Fontconfig] Re: performance patch: reduce stat () call if all cache files can be trusted
Takashi Iwai wrote:> At Fri, 10 Feb 2006 17:16:17 -0500, > Patrick Lam wrote: > >>Takashi Iwai wrote: >> >>>However, such an option might be helpful for almost read-only sytems >>>like thin clients. >> >>It sounds like you''d want to merge all config files into one on a thin >>client to get this perf gain without adding unsafe options. > > Imagine all files are mounted as read-only over NFS, including fonts > and font cache files. Why bother to check and create local caches at > each time you open apps in such a case?So I''ve read the discussion in bug 148361 now. I think it''s definitely leaving a lot of rope around for people to hang themselves with to trust cache files; this isn''t a failure mode that fontconfig ought to have, in my opinion. We''re only talking about checking global (not local) caches; if they''re wrong, then we''re in trouble. If you really wanted to have an option like that, one kind of off-the-wall way of limiting the damage would be to randomly check the caches, say with a probability of 1%. Then it would complain loudly if you said the caches were up to date but they weren''t. pat