John Arbash Meinel
john at arbash-meinel.com
Tue Mar 17 05:15:43 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Ian Clatworthy wrote:
> There are quite a few places in bzrlib that walk an
> inventory using iter_entries() but don't use the path.
> For chk repositories in particular, we can provide a
> much quicker API if we know that the path isn't needed.
> This patch introduces iter_just_entries() for that purpose.
> I'm happy to use a better name if anyone has a suggestion
> along those lines.
> Ian C.
My main concern is that this is a very arbitrary order, which isn't
particularly stable. Both 'iter_entries()' and 'iter_entries_by_dir()'
have a very defined order based on the path.
I'm not sure what you are planning on doing with 'iter_just_entries()'
but it doesn't feel like an api that can be made to do less that O(tree)
work, so it isn't something we should do often. And since it doesn't
have a defined order, you can't just walk 2 of them in parallel. (we use
iter_entries_by_dir to walk in parallel with walkdirs or with the
dirstate order, which means that you can walk a whole tree, but you know
which iterator needs to step, and when they are at the same location.)
Do you have a specific use case for this that we can evaluate? I know
you mentioned it earlier. You can just give me the name of that thread
if it is easier.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar