You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When looking at a flamegraph produced while running a system-benchmark, I discovered that we spend a lot of time in PacketReader::next() just resizing the backing Vec<u8>. There's more efficient ways to handle the buffer here. Naively, we should look at the bytescrate as it integrates with tokio natively.
This code in PacketReader is fairly self-contained so any optimization should be rather straight forward.
Change in user-visible behavior
N/A
Requires documentation change
N/A
The text was updated successfully, but these errors were encountered:
Description
When looking at a flamegraph produced while running a
system-benchmark
, I discovered that we spend a lot of time inPacketReader::next()
just resizing the backingVec<u8>
. There's more efficient ways to handle the buffer here. Naively, we should look at thebytes
crate as it integrates withtokio
natively.This code in
PacketReader
is fairly self-contained so any optimization should be rather straight forward.Change in user-visible behavior
N/A
Requires documentation change
N/A
The text was updated successfully, but these errors were encountered: