summaryrefslogtreecommitdiff
path: root/fc-cache
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-08-27 18:19:39 -0700
committerKeith Packard <keithp@neko.keithp.com>2006-08-27 18:19:39 -0700
commitdb50cbdaf592349c204ab0af0e7061ea72237044 (patch)
treed4089facdc6840ce276bd214ef87a347853b0eb9 /fc-cache
parentd2f786849c0c4503360a5c09469505b05164c6d2 (diff)
Eliminate NormalizeDir. Eliminate gratuitous stat/access calls per dir.
Normalized directory names offer protection against looped directory trees but cost enormous numbers of system calls (stat per file in the hierarchy). Also, cache file directory name contents are validated each time the directory is modified, don't re-validate every time the cache file is loaded with an access and stat call.
Diffstat (limited to 'fc-cache')
-rw-r--r--fc-cache/fc-cache.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c
index 8519388..29974b2 100644
--- a/fc-cache/fc-cache.c
+++ b/fc-cache/fc-cache.c
@@ -126,7 +126,6 @@ scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool
{
int ret = 0;
const FcChar8 *dir;
- const FcChar8 *dir_orig;
FcFontSet *set;
FcStrSet *subdirs;
FcStrList *sublist;
@@ -136,13 +135,11 @@ scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool
* Now scan all of the directories into separate databases
* and write out the results
*/
- while ((dir_orig = FcStrListNext (list)))
+ while ((dir = FcStrListNext (list)))
{
- dir = FcConfigNormalizeFontDir (config, dir_orig);
-
if (verbose)
{
- printf ("%s: \"%s\": ", program, dir ? dir : dir_orig);
+ printf ("%s: \"%s\": ", program, dir);
fflush (stdout);
}