perf(runner-shared): buffer the decompressed memtrack event stream - #560
Conversation
`MemtrackArtifact::decode_streamed` handed the zstd decoder straight to rmp_serde, which reads 1 to 8 bytes per call, so every small read went through zstd's stream API. Put a `BufReader` between the two. On a large memtrack artifact, decoding all events drops from 21-33 s to 11-21 s, with no change in peak memory. Refs COD-3704
|
Merging this PR will not alter performance
|
Buffer the decompressed stream in
MemtrackArtifact::decode_streamed.rmp_serde reads 1 to 8 bytes per call. Without a buffer, each of those reads goes through zstd's stream API. A
BufReadernow sits between the zstd decoder and rmp_serde.On a large memtrack artifact, decoding all events drops from 21-33 s to 11-21 s. Peak memory is unchanged.
Refs COD-3704