[MERGE] Update VersionedFileStore for the changes to VersionedFile

John Arbash Meinel john at arbash-meinel.com
Wed Apr 9 09:00:08 BST 2008

Hash: SHA1

Robert Collins wrote:
| This removes a bunch of transaction stuff from VersionedFileStore now
| that VersionedFiles that are around detect their validity automatically.
| -Rob


+    * ``VersionedFileStore`` no longer uses the transaction parameter given
+      to most methods; amongst other things this means that the
+      get_weave_or_empty method no longer guarantees errors on a missing weave
+      in a readonly transaction, and no longer caches versioned file instances
+      which reduces memory pressure (but requires more careful management by
+      callers to preserve performance.  (Robert Collins)

^- You need a closing ')' on your (but...

I'm also a little concerned about the caveat. Because we traditionally haven't
worried about it, I'm concerned that we'll have a subtle performance regression
here that might bite us.

Especially for stuff like 'bzr log' which would repeatedly call into the
Repository to "get_revisions()". It specifically *should* do that, because it
wants to read the first 10, then the next 50, then the next ... etc. That allows
the first display to be fast.

I'm very happy to not have to use the transaction parameters, as I always found
them to be clumsy. (repo.do_something(foo, repo.get_transaction())). However, I
think we have been slowly deprecating Store as a real concept, preferring to
have the api on Repo instead.

And you have this note specifically:
~                     self._generate_root_texts(revs)
+                    # NB: This currently reopens the inventory weave in source;
+                    # using a full get_data_stream instead would avoid this.
~                     self._fetch_inventory_weave(revs, pb)

I suppose if this is only penalizing Knits then it is fairly ok. Though I know
*I* would notice a difference until I finish my multi-convert plugin to finally
upgrade my main public repo. (It is on a slow machine, so I want to pull packs
from other locations, but I really don't want to have to pay the full upgrade +
reconcile on that machine.)

Otherwise I'm happy with the patch.

Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the bazaar mailing list