[MERGE] Inventory.iter_just_entries()
John Arbash Meinel
john at arbash-meinel.com
Tue Mar 17 05:15:43 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkm/Mf8ACgkQJdeBCYSNAAO9OgCgikm5OUAfh/9TQkSer5pBaZa7
mnUAn3upyQ29v0rso5ypZuWsho4whPoa
=yOGA
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list