1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-07-30 14:43:05 +03:00

Add SinglePacketInplaceBatchWriter

Summary:
The new writer will use a single IOBuf for in-place writes via a
accessor.

Reviewed By: jbeshay, mjoras

Differential Revision: D47648606

fbshipit-source-id: c6094eb3445587337f8a03e203aeadb2954f76b1
This commit is contained in:
Konstantin Tsoy
2023-07-27 17:00:41 -07:00
committed by Facebook GitHub Bot
parent 1216d25d47
commit 15a619fccf
5 changed files with 223 additions and 0 deletions

View File

@ -135,6 +135,13 @@ class ThreadLocalBatchWriterCache : public folly::AsyncTimeout {
namespace quic {
bool useSinglePacketInplaceBatchWriter(
uint32_t maxBatchSize,
quic::DataPathType dataPathType) {
return maxBatchSize == 1 &&
dataPathType == quic::DataPathType::ContinuousMemory;
}
// BatchWriterDeleter
void BatchWriterDeleter::operator()(BatchWriter* batchWriter) {
#if USE_THREAD_LOCAL_BATCH_WRITER