From 9b2fb8069869ec5cea32816a3589d9842595ffea Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 2 Dec 2024 14:26:11 +0100 Subject: reduce memory churn (#248) * eliminated allocation in SetCurrentThreadName * reduced memory allocator activity in cache RPC response building * reduced allocations in compact binary building --- src/zencore/compactbinarypackage.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/zencore/compactbinarypackage.cpp') diff --git a/src/zencore/compactbinarypackage.cpp b/src/zencore/compactbinarypackage.cpp index 0117b326e..7de161845 100644 --- a/src/zencore/compactbinarypackage.cpp +++ b/src/zencore/compactbinarypackage.cpp @@ -308,6 +308,11 @@ CbAttachment::AsObject() const /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +CbPackage::CbPackage() +{ + Attachments.reserve(16); +} + void CbPackage::SetObject(CbObject InObject, const IoHash* InObjectHash, AttachmentResolver* InResolver) { -- cgit v1.2.3