dirstate format 2 - passing interface tests again

Robert Collins robertc at robertcollins.net
Wed Feb 21 12:59:17 GMT 2007


So I have dirstate passing interface tests again, and its slightly
faster:

xml:
$ PYTHONPATH=~/bzr.dirstate python -m timeit -r 5 -s "import
bzrlib.workingtree" -s
"tree=bzrlib.workingtree.WorkingTree.open('HEAD')" "tree.lock_read();
tree.read_working_inventory(); rt = tree.basis_tree(); rt.lock_read();
rt.inventory; rt.unlock(); tree.unlock()"
10 loops, best of 5: 2.53 sec per loop

format 1 dirstate
$ PYTHONPATH=~/bzr.dirstate python -m timeit -r 5 -s "import
bzrlib.workingtree" -s
"tree=bzrlib.workingtree.WorkingTree.open('HEAD.dirstate')"
"tree.lock_read(); tree.read_working_inventory(); rt =
tree.basis_tree(); rt.lock_read(); rt.inventory; rt.unlock();
tree.unlock()" 
10 loops, best of 5: 2.29 sec per loop

vs
format 2 dirstate 
$ PYTHONPATH=~/bzr.dirstate python -m timeit -r 5 -s "import
bzrlib.workingtree" -s
"tree=bzrlib.workingtree.WorkingTree.open('HEAD.dirstate')"
"tree.lock_read(); tree.read_working_inventory(); rt =
tree.basis_tree(); rt.lock_read(); rt.inventory; rt.unlock();
tree.unlock()" 
10 loops, best of 5: 2.17 sec per loop

The newer layout is definately more compact: its dropped from >15MB to
13MB, which while not huge is a nice little win.

Whats the real world performance difference ? : Well its bedtime for me,
but perhaps you can grab it and play :).

Certainly I dont expect huge differences right now, but if I can get a
delta-from-dirstate routine in place it should be significant.

Even more so if I get the mutli-bisect-from-disk code going.

-Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070221/519b9809/attachment.pgp 


More information about the bazaar mailing list