From 99b47366fe8562f3b8e502feb6ea3fb24f3c0fb1 Mon Sep 17 00:00:00 2001 From: Per Hedbor <ph@opera.com> Date: Thu, 4 Jun 2009 13:14:38 +0200 Subject: [PATCH] Running with FILE_STAT_CACHE disabled is faster for all code I have tried (on modern systems, Solaris 10 and Linux at least). And it no longer breaks pike if there are more than 100.000 files in a directory. Rev: lib/master.pike.in:1.462 --- lib/master.pike.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/master.pike.in b/lib/master.pike.in index df06ab5cc5..1cc35200a0 100644 --- a/lib/master.pike.in +++ b/lib/master.pike.in @@ -6,7 +6,7 @@ // Pike is distributed under GPL, LGPL and MPL. See the file COPYING // for more information. // -// $Id: master.pike.in,v 1.461 2009/03/05 11:44:17 grubba Exp $ +// $Id: master.pike.in,v 1.462 2009/06/04 11:14:38 per Exp $ #pike __REAL_VERSION__ //#pragma strict_types @@ -22,7 +22,7 @@ #define PIKE_AUTORELOAD #define GETCWD_CACHE -#define FILE_STAT_CACHE +//#define FILE_STAT_CACHE // This define is searched and replaced by bin/install.pike. #undef PIKE_MODULE_RELOC @@ -1150,7 +1150,7 @@ Stat master_file_stat(string x) #ifdef __NT__ tmp = map(tmp, lower_case); #endif - d = dir_cache[dir] = aggregate_multiset(@tmp); + d = dir_cache[dir] = (multiset)tmp; } else dir_cache[dir]=0; @@ -1165,6 +1165,7 @@ Stat master_file_stat(string x) } #else #define master_file_stat file_stat +#define master_get_dir get_dir #endif // FILE_STAT_CACHE -- GitLab