[PATCH 0/2] Resolve stratum and chunk refs in batches

Jannis Pohlmann jannis.pohlmann at codethink.co.uk
Mon Jan 7 18:40:35 GMT 2013

Repo: ssh://git@trove.baserock.org/baserock/baserock/morph.git
Ref: jannispohlmann/resolve-refs-and-morphologies-in-batches
SHA1: 451e2ab7ea3d595476ec5e57f33da8eef1661773

NOTE: This is probably not the nicest possible implementation but
I wanted to at least submit it because I won't have much time to hack
on Baserock in the next few weeks.

At least I can provide a tiny benchmark: I tested this functionality
building a system with 5 strata and 116 chunks. The cache server was
running on, thus HTTP requests were fast and there is no
significant time difference.

  Time: ~15s
  GET requests: 322 (117 /sha1s, 119 /trees, 86 /files)
  POST requests: 0
  Total HTTP requests: 322

  Time: ~13s
  GET requests: 205 (0 /sha1s, 119 trees, 86 /files)
  POST requests: 6
  Total HTTP requests: 211

In this case (large strata), the number of HTTP requests was reduced
by about 35%.

Jannis Pohlmann (2):
  Add RemoteRepoCache.resolve_refs() method with tests
  Resolve stratum and chunk refs in batches

 morphlib/app.py                   | 97 +++++++++++++++++++++++++++++++++++++--
 morphlib/localrepocache.py        |  1 +
 morphlib/remoterepocache.py       | 45 ++++++++++++++++++
 morphlib/remoterepocache_tests.py | 83 ++++++++++++++++++++++++++++++++-
 4 files changed, 220 insertions(+), 6 deletions(-)


More information about the baserock-dev mailing list