locking repository makes no difference to speed of repeated get_revision calls

Bug #248604 reported by Michael Hudson-Doyle
2
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Medium
Unassigned

Bug Description

While we all know that calling get_revisions once is better than calling get_revision a bunch of times, it seems that there is still a serious regression in performance of the latter between 1.5 and current bzr.dev (not far off 1.6 at the time of writing).

Basically, it seems that given a branch b and its revision_history rh. "map(b.repository.get_revision, rh)" runs just as fast (or slowly) irrespective of whether the branch is locked. With 1.5, locking the branch makes it run at least several times faster.

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

Is this on a Knit format repository, or a Pack format repository?

The dev branch since about 1.3 has removed the Transaction cache for Knit repositories. We've been continually restoring it for each release (1.4, 1.5).

Out of curiosity, does this mean b.repository.get_revisions(rh) is still fast in dev? (It is sort of implied by your comments)

I don't know whether we plan to restore the transaction cache yet again for the 1.6 release. Knits are sort of fading as Robert brings in more patches to align the internals with pack style repositories.

My personal feeling is that the cache should be kept for Knit repos. I believe Robert wanted it out to help force developers to move apis over to better ones (like using get_revisions() instead of looping over get_revision). Though as most of us are now solely on pack repos, nobody really realizes how much performance on Knit repos has regressed. So that part of the experiment is a bit of a failure.

Changed in bzr:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I think I mis-diagnosed what I was seeing. The real bug is https://bugs.edge.launchpad.net/bzr/+bug/252481.

Changed in bzr:
status: Triaged → Invalid
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 248604] Re: locking repository makes no difference to speed of repeated get_revision calls

On Tue, 2008-07-15 at 14:20 +0000, John A Meinel wrote:

> My personal feeling is that the cache should be kept for Knit repos. I
> believe Robert wanted it out to help force developers to move apis over
> to better ones (like using get_revisions() instead of looping over
> get_revision). Though as most of us are now solely on pack repos, nobody
> really realizes how much performance on Knit repos has regressed. So
> that part of the experiment is a bit of a failure.

I wanted it gone because it has global impact, not format-specific
impact, it makes a lot of code more complex, drives up memory use and
has generally been an ongoing nuisance for code cleanup.

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.