nodemaker.create_new_mutable_directory: pack_children() in initial_contents=
authorBrian Warner <warner@lothar.com>
Sat, 17 Oct 2009 20:31:46 +0000 (13:31 -0700)
committerBrian Warner <warner@lothar.com>
Tue, 20 Oct 2009 00:51:18 +0000 (17:51 -0700)
commit1273b5c233b076aa22fe187144483fb226ae1753
tree97bd24c97312dd3481bcefe859e5f2f829cd0a3d
parent59ee02e82f0bacc0aec3d85ddd81a48fff2b881c
nodemaker.create_new_mutable_directory: pack_children() in initial_contents=
instead of creating an empty file and then adding the children later.

This should speed up mkdir(initial_children) considerably, removing two
roundtrips and an entire read-modify-write cycle, probably bringing it down
to a single roundtrip. A quick test (against the volunteergrid) suggests a
30% speedup.

test_dirnode: add new tests to enforce the restrictions that interfaces.py
claims for create_new_mutable_directory(): no UnknownNodes, metadata dicts
src/allmydata/nodemaker.py
src/allmydata/test/test_dirnode.py