Skip to content
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

chain: don’t clone Store in RuntimeAdapter::get_store #7841

Merged
merged 2 commits into from
Oct 17, 2022

Conversation

mina86
Copy link
Contributor

@mina86 mina86 commented Oct 17, 2022

Replace RuntimeAdapter::get_store with RuntimeAdapter::store method
which returns reference to a Store rather than cloning it. This
avoids some instances where the Store is cloned unnecessarily.

Replace RuntimeAdapter::get_store with RuntimeAdapter::store method
which returns reference to a Store rather than cloning it.  This
avoids some instances where the Store is cloned unnecessarily.
@mina86 mina86 requested a review from a team as a code owner October 17, 2022 13:05
@mina86 mina86 requested a review from mzhangmzz October 17, 2022 13:05
Copy link
Contributor

@matklad matklad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we perhaps shouldn't have this at all, but in the real world this is a good improvement!

@near-bulldozer near-bulldozer bot merged commit 53bd185 into near:master Oct 17, 2022
nikurt pushed a commit that referenced this pull request Oct 17, 2022
Replace RuntimeAdapter::get_store with RuntimeAdapter::store method
which returns reference to a Store rather than cloning it.  This
avoids some instances where the Store is cloned unnecessarily.
@mina86 mina86 deleted the a branch October 17, 2022 15:53
nikurt pushed a commit that referenced this pull request Nov 9, 2022
Replace RuntimeAdapter::get_store with RuntimeAdapter::store method
which returns reference to a Store rather than cloning it.  This
avoids some instances where the Store is cloned unnecessarily.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants