Verify: list the pack folders only with more packs than folders
With few packs a request per pack is fewer requests than 256 listings. On
FTP every listing takes a data connection; the FTP server of the integration
tests has ten passive ports, and 256 listings in a row slowed it down until a
read failed ("Not found: snapshots/...").
This commit is contained in:
@@ -211,6 +211,15 @@ final class BlobIndex {
|
||||
}
|
||||
}
|
||||
|
||||
/** Number of packs that hold blobs of the index. */
|
||||
public function packCount(): int {
|
||||
$packs = [];
|
||||
foreach ($this->blobs as [$pack]) {
|
||||
$packs[$pack] = true;
|
||||
}
|
||||
return count($packs);
|
||||
}
|
||||
|
||||
/** Bytes of all blobs in the index (encrypted size, i.e. what is stored in packs). */
|
||||
public function storedBytes(): int {
|
||||
$total = 0;
|
||||
|
||||
Reference in New Issue
Block a user