mirror of
https://github.com/runbear-io/beardrive.git
synced 2026-08-25 08:08:08 +02:00
perf(sync): parallel blob upload + progress bar for initial import
The initial import was latency-bound: the push loop uploaded blobs strictly serially, doing an Exists round-trip then a Put per blob (~2-3N sequential round-trips against the hub). - Upload unique blobs in parallel (errgroup, 16 in flight) — the main win. - Drop the separate Exists round-trip: the backend's Put is idempotent and the hub already skips content it has (reported during signing), so the check was redundant. - Session.OnProgress emits upload progress (done/total files + bytes) from the push phase; the CLI renders an in-place bar on a TTY and periodic percentage lines otherwise, wired into `bdrive init`'s initial cycle and `bdrive sync`. The daemon stays silent. Multi-device convergence tests pass with -race; new TestPushProgress covers the progress emission. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R7Q9ZKSZRTdvrSJkYLUmYs
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
9e710a2540
commit
64fa269e52
@@ -14,6 +14,7 @@ require (
|
||||
github.com/spf13/cobra v1.10.2
|
||||
github.com/yuin/goldmark v1.8.2
|
||||
golang.org/x/crypto v0.51.0
|
||||
golang.org/x/sync v0.21.0
|
||||
google.golang.org/api v0.284.0
|
||||
modernc.org/sqlite v1.53.0
|
||||
)
|
||||
@@ -79,7 +80,6 @@ require (
|
||||
go.opentelemetry.io/otel/trace v1.43.0 // indirect
|
||||
golang.org/x/net v0.55.0 // indirect
|
||||
golang.org/x/oauth2 v0.36.0 // indirect
|
||||
golang.org/x/sync v0.21.0 // indirect
|
||||
golang.org/x/sys v0.45.0 // indirect
|
||||
golang.org/x/term v0.43.0 // indirect
|
||||
golang.org/x/text v0.37.0 // indirect
|
||||
|
||||
Reference in New Issue
Block a user