From 7c815692b42294363c2568029fe97c64de8dfcdc Mon Sep 17 00:00:00 2001 From: Maxim Sharabayko Date: Tue, 12 Jul 2022 15:36:21 +0200 Subject: [PATCH] [core] Increased CUnitQueue block allocation speed. Allocates 128 additional units at the start and every time 90% of units are taken. Previously was allocating only 32 units. --- srtcore/api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srtcore/api.cpp b/srtcore/api.cpp index 57566b9a3..9a07be357 100644 --- a/srtcore/api.cpp +++ b/srtcore/api.cpp @@ -2983,7 +2983,7 @@ void srt::CUDTUnited::updateMux(CUDTSocket* s, const sockaddr_any& addr, const U m.m_pSndQueue = new CSndQueue; m.m_pSndQueue->init(m.m_pChannel, m.m_pTimer); m.m_pRcvQueue = new CRcvQueue; - m.m_pRcvQueue->init(32, s->core().maxPayloadSize(), m.m_iIPversion, 1024, m.m_pChannel, m.m_pTimer); + m.m_pRcvQueue->init(128, s->core().maxPayloadSize(), m.m_iIPversion, 1024, m.m_pChannel, m.m_pTimer); // Rewrite the port here, as it might be only known upon return // from CChannel::open.