aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/compactbinarypackage.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2024-12-02 14:26:11 +0100
committerGitHub Enterprise <[email protected]>2024-12-02 14:26:11 +0100
commit9b2fb8069869ec5cea32816a3589d9842595ffea (patch)
tree436a21daef8798377f23765e3f022c92f90ba5ac /src/zencore/compactbinarypackage.cpp
parentvalidate that root path exists for workspace before adding it (#250) (diff)
downloadzen-9b2fb8069869ec5cea32816a3589d9842595ffea.tar.xz
zen-9b2fb8069869ec5cea32816a3589d9842595ffea.zip
reduce memory churn (#248)
* eliminated allocation in SetCurrentThreadName * reduced memory allocator activity in cache RPC response building * reduced allocations in compact binary building
Diffstat (limited to 'src/zencore/compactbinarypackage.cpp')
-rw-r--r--src/zencore/compactbinarypackage.cpp5
1 files changed, 5 insertions, 0 deletions
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)
{