Delay creating knit contents

John Arbash Meinel john at
Wed Sep 6 00:25:27 BST 2006

The attached patch changes when Knit files create their first file
contents. So that instead of being created when you instantiate them,
they are only created when the first data is put into the files.

This has a pretty large impact on pushing over sftp. Specifically
without this patch:

SFTPSlowSocketBenchmark.test_initial_push   OK 167569ms/178929ms

but with the patch:

SFTPSlowSocketBenchmark.test_initial_push   OK 105947ms/117429ms

So that is taking it down from 160s down to 100s. I haven't spent a lot
of time profiling the new code, as I thought the fix would have had an
even greater effect. But right now, I'd like to just get what I have
merged, and then I can look into making it even better.

This also affects 'bzr commit' time.:
CommitBenchmark.test_commit_kernel_like_tree   OK 50614ms/54579ms
CommitBenchmark.test_commit_kernel_like_tree   OK 39780ms/46376ms

So that is a 25% improvement for committing 10K new files.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: reduce_knit_churn.diff
Type: text/x-patch
Size: 13687 bytes
Desc: not available
Url : 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : 

More information about the bazaar mailing list