An error occurred while fetching the assigned milestone of the selected merge_request.
catfile: Introduce request queues to allow batching reads
Compare changes
Files
3- Patrick Steinhardt authored
The object reader will, for each requested object, write the revision into the catfile process and then wait for the object's header to be written to the process's standard output. This pattern is quite inefficient given that we're forced to wait for the roundtrip to complete, where a lot of callsites could instead easily split up writing the request and reading the object. Furthermore, we cannot use buffered I/O and are forced to create a separate tracing spans per requested object. Prepare to fix these shortcomings by reworking the object reader's internals to use an object reader queue. This allows us to split up request and read of the object, opens up a way to use buffered I/O and furthermore allows us to use a single tracing span across the lifetime of the queue. No change in behaviour is expected given that the queue is not yet used by anything except as implementation detail of the `Object()` function.
@@ -218,7 +218,7 @@ func TestCache_ObjectReader(t *testing.T) {