-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPCC-31003 Move instead of copying objects to improve performance #19371
base: master
Are you sure you want to change the base?
Conversation
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-31003 Jirabot Action Result: |
Signed-off-by: Shamser Ahmed <[email protected]>
@@ -2242,7 +2242,7 @@ class CStatisticCollection : public CInterfaceOf<IStatisticCollection> | |||
++scopeItem; | |||
} | |||
|
|||
CStatisticCollection * tgtScopeCollection = ensureSubScopePath(path); | |||
CStatisticCollection * tgtScopeCollection = ensureSubScopePath(std::move(path)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More efficient is to change the prototype of ensureSubScopePath:
CStatisticCollection * ensureSubScopePath(const std::initializer_list<const StatsScopeId> & path)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would. But the suggested change it would no longer be possible to provide an initializer list to ensureSubScopePath. For example, this would no longer be possible ensureSubScopePath({scope1, scope2, scope3}). Do you think we should still go with changing the arg to a reference? @ghalliday
Type of change:
Checklist:
Smoketest:
Testing: