On Thu, Jul 05, 2012 at 08:19:51AM -0700, Tim Kientzle wrote: >> >> To be honest, I've considered altering bsdtar's directory-traversal >> code so that it always sorts the first 100 names in a directory >> and then leaves the rest unsorted. That would give fully-sorted >> output for almost all cases and avoid the memory consumption >> (and slow performance) on very large directories. >> Great! Do you mean something like --sort-first-directory-entries=n (with default 100, and possibly "unlimited"), default default being --sort-first-directory-entries=0 if --sort-first-directory-entries is not specified
or --sort-directory / --no-sort-directory with 100 not settable on the command line, and an array of 100*(PATH_MAX+1) statically allocated in the code? I would prefer to avoid the second one of course because i'd like to be able to easily raise 100 if needed (recompilation is okay). In addition, "always" sorting is IMHO bad idea for people used to get their 10000 files in directory order since ages. Regards, Denis Excoffier.
