Comment 3 for bug 294479

Revision history for this message
Andrew Bennetts (spiv) wrote :

Well, it has no cache size set because nothing sets it ;)

InterPackRepo falls back on the generic RepoFetcher when there are fallback repositories. The NewPack is created by the start_write_group() that does, and nothing ever sets the cache size.

A simple hack would be to parameterise RepoFetcher a bit more, so that InterPackRepo can give it a function to run after the start_write_group(). I've attached a patch that does this, and it does give much better behaviour:

"
HPSS calls: 15 <bzrlib.smart.medium.SmartTCPClientMedium object at 0x91790ac>
HPSS calls: 10 <bzrlib.smart.medium.SmartTCPClientMedium object at 0x9f48bac>
HPSS calls: 11 <bzrlib.smart.medium.SmartTCPClientMedium object at 0x9feae6c>
HPSS calls: 203 <bzrlib.smart.medium.SmartTCPClientMedium object at 0x8f2b72c>

real 1m58.151s
user 1m18.913s
sys 0m2.164s
"