feat: concurrent manifest downloads in ListSnapshots
All checks were successful
check / check (pull_request) Successful in 4m7s
All checks were successful
check / check (pull_request) Successful in 4m7s
Replace serial getManifestSize() calls with bounded concurrent downloads using errgroup. For each remote snapshot not in the local DB, manifest downloads now run in parallel (up to 10 concurrent) instead of one at a time. Changes: - Use errgroup with SetLimit(10) for bounded concurrency - Collect remote-only snapshot IDs first, pre-add entries with zero size - Download manifests concurrently, patch sizes from results - Remove now-unused getManifestSize helper (logic inlined into goroutines) - Promote golang.org/x/sync from indirect to direct dependency closes #8
This commit is contained in:
2
go.mod
2
go.mod
@@ -24,6 +24,7 @@ require (
|
||||
github.com/spf13/cobra v1.10.1
|
||||
github.com/stretchr/testify v1.11.1
|
||||
go.uber.org/fx v1.24.0
|
||||
golang.org/x/sync v0.18.0
|
||||
golang.org/x/term v0.37.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
modernc.org/sqlite v1.38.0
|
||||
@@ -266,7 +267,6 @@ require (
|
||||
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 // indirect
|
||||
golang.org/x/net v0.47.0 // indirect
|
||||
golang.org/x/oauth2 v0.33.0 // indirect
|
||||
golang.org/x/sync v0.18.0 // indirect
|
||||
golang.org/x/sys v0.38.0 // indirect
|
||||
golang.org/x/text v0.31.0 // indirect
|
||||
golang.org/x/time v0.14.0 // indirect
|
||||
|
||||
Reference in New Issue
Block a user