]> arthur.barton.de Git - bup.git/commit
Split directory recursion stuff from cmd-index.py into drecurse.py.
authorAvery Pennarun <apenwarr@gmail.com>
Wed, 3 Feb 2010 21:42:48 +0000 (16:42 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 3 Feb 2010 21:42:48 +0000 (16:42 -0500)
commit5db9f397a36fa0b601f40a98f456a9f43debad02
tree3719636a2239637743d11f247ea3b73f65fb6d05
parente27c726ffe35403061a4e53147f7f27b3647dcb4
Split directory recursion stuff from cmd-index.py into drecurse.py.

Also add a new command, 'bup drecurse', which just recurses through a
directory tree and prints all the filenames.  This is useful for timing
performance vs. the native 'find' command.

The result is a bit embarrassing; for my home directory of about 188000
files, drecurse is about 10x slower:

$ time bup drecurse -q ~
real 0m2.935s
user 0m2.312s
sys 0m0.580s

$ time find ~ -printf ''
real 0m0.385s
user 0m0.096s
sys 0m0.284s

time find ~ -printf '%s\n' >/dev/null
real 0m0.662s
user 0m0.208s
sys 0m0.456s
Makefile
cmd-drecurse.py [new file with mode: 0755]
cmd-index.py
drecurse.py [new file with mode: 0644]
helpers.py
index.py