What is KnitPackStreamSource _for_
John Arbash Meinel
john at arbash-meinel.com
Fri Jun 19 04:19:21 BST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> It has a docstring that documents its assumptions, but not why its
> needed. The generic StreamSource should be able to perform equally.
>
> John - could you expand on why it exists (ideally as a patch).
>
> -Rob
StreamSource can't make as much assumptions about the data stream
because it is more generic.
1) It can't assume atomic inserts so it sends texts before inventories.
This requires either buffering the inventories or reading them twice.
2) Similarly about fetching in topological order for Revisions (it does
a topo_sort that we don't need.)
3) Because it has to handle all permutations, the code is *much* harder
to write and read, and certainly make perform optimally. Having a simple
"data X to data X" stream is much cleaner (IMO). For example, all of the
code to handle converting between rich roots, or chk formats, or...
I'm not sure how you want this documented. I'll be happy to flesh out
whatever you would like.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAko7A7kACgkQJdeBCYSNAAMNUgCfaEqifmGDmsJNZzRzFtNIZWnn
N/YAnAxjjF2CVABw7RgV8Y6bIwcb5Njv
=3Rec
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list