Skip to content

Commit

Permalink
HPCC-31003 Move instead of copying objects to improve performance
Browse files Browse the repository at this point in the history
Signed-off-by: Shamser Ahmed <[email protected]>
  • Loading branch information
shamser committed Dec 20, 2024
1 parent 70ccefc commit 085868d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/workunit/workunit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2708,7 +2708,7 @@ void StatisticsAggregator::recordStats(IStatisticCollection * sourceStats, unsig
verifyex(graphScopeId.setScopeText(graphName));
StatsScopeId wfScopeId(SSTworkflow, wfid);
StatsScopeId sgScopeId(SSTsubgraph, sgId);
statsCollection->recordStats(mapping, sourceStats, {wfScopeId, graphScopeId, sgScopeId});
statsCollection->recordStats(mapping, sourceStats, {std::move(wfScopeId), std::move(graphScopeId), std::move(sgScopeId)});
}

// Recalculate aggregates and then write the aggregates to global stats (dali)
Expand Down
2 changes: 1 addition & 1 deletion system/jlib/jstats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2242,7 +2242,7 @@ class CStatisticCollection : public CInterfaceOf<IStatisticCollection>
++scopeItem;
}

CStatisticCollection * tgtScopeCollection = ensureSubScopePath(path);
CStatisticCollection * tgtScopeCollection = ensureSubScopePath(std::move(path));
bool wasUpdated = false;
// More efficient to iterate over stats rather than mapping...
ForEachItemIn(i, curSrcCollection->stats)
Expand Down

0 comments on commit 085868d

Please sign in to comment.