-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Use get_multi instead of get for datastore reads #1814
Conversation
Signed-off-by: Achal Shah <achals@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #1814 +/- ##
==========================================
- Coverage 84.85% 84.84% -0.01%
==========================================
Files 92 92
Lines 6828 6844 +16
==========================================
+ Hits 5794 5807 +13
- Misses 1034 1037 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
What is the performance difference between these two approaches? Have you run a benchmark? |
retrieving 10 records, using pytest-benchmark. Single retreival seems to be strictly slower, which is not surprising since
|
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: achals, felixwang9817 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Achal Shah <achals@gmail.com>
New changes are detected. LGTM label has been removed. |
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah achals@gmail.com
What this PR does / why we need it:
get is a wrapper around get_multi, and get_multi reduces the network costs involved.
Which issue(s) this PR fixes:
Fixes #1759
Does this PR introduce a user-facing change?: