mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-08 09:42:06 +03:00
Search loss buffer before retransmission buffer when determining if a write is a clone.
Summary: We maintain the invariant that a buffer cannot be in the loss buffer and retransmission buffers at the same time. As the retransmission buffer holds all unacknowledged data that isn't marked lost, it is very likely to be larger than the loss buffer. This makes the existing case to check for cloning very expensive. Instead search the loss buffer first, change the search of the loss buffer to a binary search, and elide the double search. Reviewed By: yangchi Differential Revision: D18203444 fbshipit-source-id: 66a4e424d61c4b0e3cad12c7eca009ad3d6c5a0d
This commit is contained in:
committed by
Facebook Github Bot
parent
d0d75464ca
commit
027fedad5b
@@ -247,7 +247,7 @@ void dropPackets(QuicServerConnectionState& conn) {
|
||||
[&streamFrame](const auto& buffer) {
|
||||
return streamFrame->offset == buffer.offset;
|
||||
});
|
||||
EXPECT_TRUE(itr != stream->retransmissionBuffer.end());
|
||||
ASSERT_TRUE(itr != stream->retransmissionBuffer.end());
|
||||
stream->lossBuffer.insert(
|
||||
std::upper_bound(
|
||||
stream->lossBuffer.begin(),
|
||||
|
Reference in New Issue
Block a user