GNOME Bugzilla – Bug 748776
Shorten fontconfig timeout
Last modified: 2015-05-06 19:15:34 UTC
Created attachment 302740 [details] [review] patch Please change fontconfig timeout from 2 seconds to 200 milliseconds. This should make font installations to be propagated to applications faster. Originally I made this quite delayed, to make sure it doesn't fire too much when people are installing packages, etc, but after many years, I think that was a very bad choice. Patch attached. Thanks.
Review of attachment 302740 [details] [review]: We'll need a git-formatted patch before committing it, with the info you gave in the bug comment. Otherwise looks good, even to backport.
Thanks Bastien. Pushed to master. Please cherry-pick to branches as you see fit. commit 9ac05a277804a387d7c33305e68071544ad05566 Author: Behdad Esfahbod <behdad@behdad.org> Date: Sat May 2 15:47:39 2015 -0400 xsettings: Shorten fontconfig timeout Change fontconfig timeout from 2 seconds to 200 milliseconds. This should make font installations to be propagated to applications faster. Originally I made this quite delayed, to make sure it doesn't fire too much when people are installing packages, etc, but after many years, I think that was a very bad choice. Currently, it takes 4 seconds from when I "mv font.ttf ~/.fonts/" until apps like gedit switching to it. Hopefully this change saves about 2.3 seconds of that (on average 0.5s was added by g_timeout_add_seconds()). https://bugzilla.gnome.org/show_bug.cgi?id=748776
Reopening. I did some more testing, and think I can remove the timeout completely. Please see this sample commit: https://github.com/behdad/fontconfig-monitor/commit/f2e44c3d4df60864687d42eee10a0123ce50c247 (I copied fontconfig-monitor into its own repo to make testing with it easier. I can add a pointer to the copy in gsd if you find that useful. Let me know how it looks and I'll push it to master. Thanks.
(In reply to Behdad Esfahbod from comment #3) > Reopening. > > I did some more testing, and think I can remove the timeout completely. > Please see this sample commit: > > https://github.com/behdad/fontconfig-monitor/commit/ > f2e44c3d4df60864687d42eee10a0123ce50c247 > > (I copied fontconfig-monitor into its own repo to make testing with it > easier. I can add a pointer to the copy in gsd if you find that useful. > > Let me know how it looks and I'll push it to master. Looks fine. But I'd really rather I didn't have to jump through hoops to apply this patch. I've fixed up the patch and commit messages and applied it to master and gnome-3-14.
Thanks Bastien.