[MERGE] Use a LRUCache in LocalTransport.clone

Andrew Bennetts andrew at canonical.com
Tue Jan 15 00:34:59 GMT 2008

Robert Collins wrote:
> On Sat, 2008-01-05 at 01:41 +1100, Andrew Bennetts wrote:
> > This is a simple change to use a LRUCache in LocalTransport.clone.  It seems
> > that calculating an abspath can be quite expensive.  By keeping the LRUCache I
> > reduce the time to pull a 300 revisions from a knit repo into a pack repo from
> > ~32 seconds to ~26 seconds!
> Thats nice, but why do we care? We're trying to migrate to packs and
> conversions should be one-offs. It should not be any slower than knit to
> knit cloning anyhow.

FWIW, I noticed this because I was branching from knit repo into a pack repo,
and was curious about why it was so slow.  This isn't a common operation for me,
seeing as I use packs almost everywhere now, so I'm not too worried if this
speed-up lands or not.

I did think it was interesting enough to share with the list, though.


More information about the bazaar mailing list