Repository navigation
perf(runner-shared): read the memtrack event stream through a 1 MiB buffer - #616
not-matthias wants to merge 1 commit into
Conversation
…uffer Stack records carry an 8 KiB byte field, which `rmp_serde` reads with `Read::take(..).read_to_end`. With the default 8 KiB `BufReader` almost every such read crosses a buffer refill. A 1 MiB buffer keeps those reads inside the buffer; on a 2.3 GiB artifact with 14.6M stack records this took the memory callgraph parse from about 52 s to 48 s. Refs COD-4142
Merging this PR will degrade performance by 47.08%3 warnings
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Read the decompressed memtrack event stream through a 1 MiB
BufReaderinstead of the default 8 KiB one.Stack records carry an 8 KiB byte field that
rmp_serdereads withRead::take(..).read_to_end, about the size of the default buffer. A buffer well above that field size is cheap and measurably faster.Measured on one 2.3 GiB artifact whose events are mostly stack records: the full memory callgraph parse went from 51.4 s / 53.3 s to 49.3 s / 48.3 s (two runs each, same machine), output byte-identical.
Refs COD-4142