Skip to content
Snippets Groups Projects
user avatar
Patrick Steinhardt authored
The RPCs which enumerate LFS pointers all follow the same pattern: first
they spawn a couple of Git commands, then they filter down objects such
that we end up with LFS pointers, only, and then finally we send out the
list of LFS pointers. Depending on repository size, this pattern can be
quite inefficient given that we first collect all LFS pointers only to
send them out at the end. This means both that we need to allocate a
potentially huge chunk of blob, and that we cannot parallelize sending
of LFS pointers and the Git processes.

Improve this by passing down a chunker. This allows us to easily send
LFS pointers in batches while we're consuming them as soon as we hit the
gRPC message size limit. As a result, we don't have to allocate a big
array of LFS pointer pointers, and we can start sending while Git is
still doing its thing.

Changelog: performance
5d24b291
Name Last commit Last update