aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/projectstore/remoteprojectstore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-10-13 09:38:02 +0200
committerGitHub <[email protected]>2023-10-13 09:38:02 +0200
commit1d992a472c54ef9a63364996031e3c6d2f8affe5 (patch)
treebb20344ed4c5b4295c12914bf0124e11be5ff3a7 /src/zenserver/projectstore/remoteprojectstore.cpp
parentMerge pull request #465 from EpicGames/zs/default-port-change (diff)
downloadzen-1d992a472c54ef9a63364996031e3c6d2f8affe5.tar.xz
zen-1d992a472c54ef9a63364996031e3c6d2f8affe5.zip
faster oplog iteration (#471)
* use a CbObjectView instead of CbObject to avoid creating IOBufferCore instances * use BasicFileBuffer directly where possible * changelog
Diffstat (limited to 'src/zenserver/projectstore/remoteprojectstore.cpp')
-rw-r--r--src/zenserver/projectstore/remoteprojectstore.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/zenserver/projectstore/remoteprojectstore.cpp b/src/zenserver/projectstore/remoteprojectstore.cpp
index ee3456ecc..02557dfa5 100644
--- a/src/zenserver/projectstore/remoteprojectstore.cpp
+++ b/src/zenserver/projectstore/remoteprojectstore.cpp
@@ -257,7 +257,7 @@ BuildContainer(CidStore& ChunkStore,
std::vector<SharedBuffer> ChunksInBlock;
std::unordered_map<IoHash, int, IoHash::Hasher> Attachments;
- auto RewriteOp = [&](int LSN, CbObject Op, const std::function<void(CbObject)>& CB) {
+ auto RewriteOp = [&](int LSN, CbObjectView Op, const std::function<void(CbObjectView)>& CB) {
bool OpRewritten = false;
CbArrayView Files = Op["files"sv].AsArrayView();
if (Files.Num() == 0)
@@ -401,7 +401,7 @@ BuildContainer(CidStore& ChunkStore,
tsl::robin_map<int, std::string> OpLSNToKey;
- Oplog.IterateOplogWithKey([&](int LSN, const Oid&, CbObject Op) {
+ Oplog.IterateOplogWithKey([&](int LSN, const Oid&, CbObjectView Op) {
if (RemoteResult.IsError())
{
return;
@@ -411,7 +411,7 @@ BuildContainer(CidStore& ChunkStore,
Op.IterateAttachments([&](CbFieldView FieldView) { Attachments.insert({FieldView.AsAttachment(), LSN}); });
if (OutLooseAttachments != nullptr)
{
- RewriteOp(LSN, Op, [&SectionOpsWriter](CbObject Op) { SectionOpsWriter << Op; });
+ RewriteOp(LSN, Op, [&SectionOpsWriter](CbObjectView Op) { SectionOpsWriter << Op; });
}
else
{