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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user