[Merge] lp:~abentley/bzr/fix_get_mtime into lp:~bzr/bzr/trunk

Aaron Bentley aaron at aaronbentley.com
Tue Sep 29 05:27:07 BST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Moving to list...

Robert Collins wrote:
> On Tue, 2009-09-29 at 03:25 +0000, Aaron Bentley wrote:
>>> Creating a path<->id map is expensive on large trees;
>> I don't understand why there needs to be such a map.  Can we not
>> retrieve only the data we care about?  That would scale with the
>> amount of data we're actually showing, which I think is an acceptable
>> scaling factor.
> The map is needed because dirstate is laid out internally to match the
> IO pattern of 'status'

It's hard to know how often the input tree will be dirstate-backed, but
I believe it will be in the cases qbzr hit.  I assume CHK-backed trees
can do id2path without constructing a map?

>, and thats very heavily biased to paths, to match
> disk layout and locality of reference. 
> So we can answer 'path2id' _very_ fast, but we cannot answer 'id2path'
> without scanning the whole dirstate to find out if 'id' exists, and thus
> where it is.

That's an unfortunate weakness considering a lot of our code was written
to use file-ids as the primary identifier.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrBjJcACgkQ0F+nu1YWqI3v0QCbB+2EpMFDm0wNNsWoxCl4T1Jb
AjMAn2hodqa/IwKJffc75HJ1JA/KSMeU
=35Xq
-----END PGP SIGNATURE-----



More information about the bazaar mailing list