diff options
| author | Dan Engelbrecht <[email protected]> | 2024-05-30 14:44:34 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-05-30 14:44:34 +0200 |
| commit | 8ce1dc72cce381b2adae256504331f2e8893f262 (patch) | |
| tree | df5ab56ce8cdf0f6664ed611f4cf1fb848718ea6 /src/zenserver | |
| parent | workspaces review feedback (diff) | |
| download | zen-8ce1dc72cce381b2adae256504331f2e8893f262.tar.xz zen-8ce1dc72cce381b2adae256504331f2e8893f262.zip | |
cache optimizations (#88)
* message formatting optimizations
* bump iostorecompression small value threshold to 1MB
Diffstat (limited to 'src/zenserver')
| -rw-r--r-- | src/zenserver/cache/httpstructuredcache.cpp | 2 | ||||
| -rw-r--r-- | src/zenserver/projectstore/projectstore.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/zenserver/cache/httpstructuredcache.cpp b/src/zenserver/cache/httpstructuredcache.cpp index 449a43653..52e31ff40 100644 --- a/src/zenserver/cache/httpstructuredcache.cpp +++ b/src/zenserver/cache/httpstructuredcache.cpp @@ -883,7 +883,7 @@ HttpStructuredCacheService::HandleGetCacheRecord(HttpServerRequest& Request, con { if (StoreLocal) { - CompressedBuffer Chunk = Attachment->AsCompressedBinary(); + const CompressedBuffer& Chunk = Attachment->AsCompressedBinary(); WriteAttachmentBuffers.push_back(Chunk.GetCompressed().Flatten().AsIoBuffer()); WriteRawHashes.push_back(Attachment->GetHash()); } diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp index 0b7c419ba..4c434c39b 100644 --- a/src/zenserver/projectstore/projectstore.cpp +++ b/src/zenserver/projectstore/projectstore.cpp @@ -1551,8 +1551,8 @@ ProjectStore::Oplog::AppendNewOplogEntry(CbPackage OpPackage) { ZEN_ASSERT(Attach.IsCompressedBinary()); - CompressedBuffer AttachmentData = Attach.AsCompressedBinary(); - const uint64_t AttachmentSize = AttachmentData.DecodeRawSize(); + const CompressedBuffer& AttachmentData = Attach.AsCompressedBinary(); + const uint64_t AttachmentSize = AttachmentData.DecodeRawSize(); WriteAttachmentBuffers.push_back(AttachmentData.GetCompressed().Flatten().AsIoBuffer()); WriteRawHashes.push_back(Attach.GetHash()); WriteRawSizes.push_back(AttachmentSize); @@ -3471,8 +3471,8 @@ ProjectStore::Rpc(HttpServerRequest& HttpReq, for (const CbAttachment& Attachment : Attachments) { - IoHash RawHash = Attachment.GetHash(); - CompressedBuffer Compressed = Attachment.AsCompressedBinary(); + IoHash RawHash = Attachment.GetHash(); + const CompressedBuffer& Compressed = Attachment.AsCompressedBinary(); WriteAttachmentBuffers.push_back(Compressed.GetCompressed().Flatten().AsIoBuffer()); WriteRawHashes.push_back(RawHash); } |