From 623556bab6e2edc18961724d1146159d615254b8 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 21 Aug 2022 11:20:03 +0200 Subject: [PATCH] b2: Increase list size to maximum Just request as many files as possible in one call to reduce the number of network roundtrips. --- internal/backend/b2/b2.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/backend/b2/b2.go b/internal/backend/b2/b2.go index 26e23627a..19328706d 100644 --- a/internal/backend/b2/b2.go +++ b/internal/backend/b2/b2.go @@ -27,7 +27,8 @@ type b2Backend struct { sem sema.Semaphore } -const defaultListMaxItems = 1000 +// Billing happens in 1000 item granlarity, but we are more interested in reducing the number of network round trips +const defaultListMaxItems = 10 * 1000 // ensure statically that *b2Backend implements restic.Backend. var _ restic.Backend = &b2Backend{}