1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-08-05 11:21:09 +03:00

Use a reserved std::vector in RegularQuicWritePacket

Summary: The code has changed since this was made an inlined vector. We now see higher cost from copy operations due to this rather than being able to move the data around.

Reviewed By: bschlinker

Differential Revision: D36151209

fbshipit-source-id: 0b10558c6bd8ebfea9bb960aac36a6c4044fc95f
This commit is contained in:
Matt Joras
2022-05-05 16:22:02 -07:00
committed by Facebook GitHub Bot
parent a02698fe51
commit 78bed75ef7
4 changed files with 7 additions and 5 deletions

View File

@@ -88,7 +88,7 @@ void writeCryptoDataProbesToSocketForTest(
}
RegularQuicWritePacket stripPaddingFrames(RegularQuicWritePacket packet) {
SmallVec<QuicWriteFrame, 4, uint16_t> trimmedFrames{};
RegularQuicWritePacket::Vec trimmedFrames{};
for (auto frame : packet.frames) {
if (!frame.asPaddingFrame()) {
trimmedFrames.push_back(frame);