Use std::list for vSendMsg

std::deque is indexed internally, which gives some unnecessary overhead
when removing the front element.
This commit is contained in:
Alexander Block 2020-04-07 06:37:37 +02:00
parent a3bc3fd0f0
commit 027a852a77

View File

@ -770,7 +770,7 @@ public:
size_t nSendSize; // total size of all vSendMsg entries size_t nSendSize; // total size of all vSendMsg entries
size_t nSendOffset; // offset inside the first vSendMsg already sent size_t nSendOffset; // offset inside the first vSendMsg already sent
uint64_t nSendBytes; uint64_t nSendBytes;
std::deque<std::vector<unsigned char>> vSendMsg; std::list<std::vector<unsigned char>> vSendMsg;
CCriticalSection cs_vSend; CCriticalSection cs_vSend;
CCriticalSection cs_hSocket; CCriticalSection cs_hSocket;
CCriticalSection cs_vRecv; CCriticalSection cs_vRecv;