// If there are less than 58,000 objects, the entire index fits in under
// 2 MiB. Callers will probably need the index immediately, so buffer
// the index in process and load from the buffer.
TemporaryBuffer.Heap buf = null;
PackIndex packIndex = null;
if (list.size() <= 58000) {
buf = new TemporaryBuffer.Heap(2 << 20);
index(buf, packHash, list);
packIndex = PackIndex.read(buf.openInputStream());
}