Code review comment for lp:~abentley/bzr/preview-tree-changes-cache

Revision history for this message
John A Meinel (jameinel) wrote :

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

Aaron Bentley wrote:
> Aaron Bentley has proposed merging lp:~abentley/bzr/preview-tree-changes-cache into lp:bzr/2.0.
>
> Requested reviews:
> bzr-core (bzr-core)
>
>
> Hi all,
>
> This patch causes PreviewTree to memoize the iter_changes values for its
> TreeTransform. It speeds up PreviewTree dramatically when there are
> large numbers of changes. The current behaviour scales O(n^2), and this
> changes it to O(n).
>
> Best of three runs of "bzr merge --preview ../bzr.dev" in bzr.ab:
>

 review: approve
 merge: approve

It would be nice if we could detect that the preview tree was
invalidated somehow, but I don't know that it needs to be done here.

Perhaps just a doc update to .get_preview_tree() which indicates that it
is considered a snapshot, and no further changes should be done without
requesting a new preview tree?

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrCZ9AACgkQJdeBCYSNAAORkACglmQVjwnJ2Bst7w14UPrKeaZF
1Z8AmwZwrLl89/nJcByi5UfH0rPzsDln
=AloF
-----END PGP SIGNATURE-----

review: Approve

« Back to merge proposal