chore(model): simplify FileInfoBatch size computation (#10776)

We used a size computation to generate reasonably sized batches, but the
ProtoSize call is fairly expensive as it requires a conversion to a wire
type etc. We don't need that much precision. Instead, just limit to 1000
files or 5000 blocks, which is likely approximately that much data
anyway.

Closes #10707

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2026-07-01 16:01:46 +00:00
committed by GitHub
parent 35576881ff
commit ef4629ea56
2 changed files with 8 additions and 13 deletions
+1 -1
View File
@@ -276,7 +276,7 @@ func (s *indexHandler) sendIndexTo(ctx context.Context) error {
// can't happen, once an error is returned the index sender exits
panic(fmt.Sprintf("bug: once failed it should stay failed (%v)", batchError))
}
l.Debugf("%v: Sending %d files (<%d bytes)", s, len(fs), batch.Size())
l.Debugf("%v: Sending %d files", s, len(fs))
lastSequence := fs[len(fs)-1].Sequence
var err error