Skip to content
Snippets Groups Projects

catfile: Introduce request queues to allow batching reads

Merged Patrick Steinhardt requested to merge pks-catfile-queue into master
1 unresolved thread
Compare changes
  • Side-by-side
  • Inline
Files
5
  • Convert the object pipeline step to use the new object info queue
    interface. This new interface allows us to batch requests, which most
    notably reduces memory allocations because we now only create a single
    tracing span. The following benchmark exercises the `ListBlobs()` RPC,
    which optionally uses only object information when no data has been
    requested. Before this change:
    
        BenchmarkListBlobs/without_contents-16   584   3092725 ns/op   244704 B/op   2129 allocs/op
    
    After this change:
    
        BenchmarkListBlobs/without_contents-16   572   2677927 ns/op   211713 B/op   1320 allocs/op
    
    As can be seen, this translates into a 40% reduction in allocations.
    
    Changelog: performance
Loading