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

Remove unnecessary copies when using lmdb cursors #2026

merged 2 commits into from May 30, 2019


Copy link

commented May 24, 2019

The cursors used when iterating tables in lmdb already contain the objects in question as a pair (key -> value). A lot of places wrap first/second to make it more readable, but inadvertently end up copying the objects. I've replaced them with references.

Also found a few other places where a copy is made unnecessarily so have used references there as well.

@wezrule wezrule added this to the V19.0 milestone May 24, 2019

@wezrule wezrule requested a review from argakiig May 24, 2019

@wezrule wezrule self-assigned this May 24, 2019

Copy link

left a comment

Good catch.

@wezrule wezrule added this to RC 4 (TBD) in V19 May 25, 2019

@wezrule wezrule added the performance label May 27, 2019

@wezrule wezrule merged commit 815f319 into nanocurrency:master May 30, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@wezrule wezrule deleted the wezrule:remove_unnecessary_coppies branch May 30, 2019


This comment has been minimized.

Copy link

commented May 31, 2019

@wezrule i suppose the copy constructor can't be deleted? Will be a hard habbit to break.

argakiig added a commit that referenced this pull request Jun 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.