>>>>> "AS" == Anno Siegel <> writes:
AS> When a directory is mostly passive (like, say, the fonts of
AS> something big and bulky), you can store more files per directory,
AS> but even then I'd put a limit at a thousand or so.
the size of a file has little to do with how many files should be in a
directory. classic unix file systems totally isolate the directory
entry from the file contents. directory searches are linear which is why
they get very slow when there are many entries. i ran into this many
years ago and redesigned a subsystem to use multiple subdirs before
finding a particular file. it effectively converted a linear search to a
tree search. i used 2 digits of the log file name for 2 levels keeping
the number of entries in any directory to under 100. it was much much
faster than the old system which had 10k+ entries in one dir. this is
still a common and easy technique. some modern unix/linux filesystems
use trees or hashes for lookup and are much faster than linear. but you
are always guaranteed to have a classic linear filesystem around so this
subdir trick will work anywhere.
and i would limit dir sizes to way less than 1000. 100-300 seems to be a
good value.
and this is way OT as it has no perl content at all.
uri
--
Uri Guttman ------
--------
http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ----------------------------
http://jobs.perl.org