sort batches of writes to reduce fragmentation

This commit is contained in:
Doug Hoyte
2023-01-11 23:36:39 -05:00
parent 428f51528b
commit 8102cd6a00
5 changed files with 18 additions and 12 deletions

View File

@ -14,7 +14,7 @@ void RelayServer::runWriter(ThreadPool<MsgWriter>::Thread &thr) {
// Prepare messages
std::deque<EventToWrite> newEvents;
std::vector<EventToWrite> newEvents;
for (auto &newMsg : newMsgs) {
if (auto msg = std::get_if<MsgWriter::AddEvent>(&newMsg.msg)) {