perf(spanner): Use arenas to speed up queries that fetch many rows#15441
Merged
scotthart merged 8 commits intogoogleapis:mainfrom Sep 12, 2025
Merged
perf(spanner): Use arenas to speed up queries that fetch many rows#15441scotthart merged 8 commits intogoogleapis:mainfrom
scotthart merged 8 commits intogoogleapis:mainfrom
Conversation
Contributor
Author
|
@scotthart could you take a look / do the gcbrun incantations |
Member
|
/gcbrun |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15441 +/- ##
=======================================
Coverage 93.04% 93.04%
=======================================
Files 2403 2403
Lines 219553 219644 +91
=======================================
+ Hits 204273 204368 +95
+ Misses 15280 15276 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
I updated the code to fix the clang tidy warning |
Member
|
/gcbrun |
Collaborator
|
We should merge |
Contributor
Author
|
Done, thanks |
scotthart
approved these changes
Sep 8, 2025
Member
scotthart
left a comment
There was a problem hiding this comment.
@scotthart reviewed 11 of 12 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @andrewro-google)
Member
|
/gcbrun |
Member
|
/gcbrun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tested by running
multiple_rows_cpu_benchmark --project=${GOOGLE_CLOUD_PROJECT} --instance=${GOOGLE_CLOUD_CPP_SPANNER_TEST_INSTANCE_ID} --table-size=1000000 --maximum-channels=8 --maximum-threads=16 --iteration-duration=5 --samples=60 --experiment=select-string --use-only-clients=true --query-size=100000(larger --query-size than in the README). The data is noisy but seems like a ~20% win on CpuTime. I don't expect this to help much with queries that return few results. For the use case I care about (fetching a whole table), we were limited by CPU when using all the threads on a machine.We still have a copy when generating Row in PartialResultSetSource::NextRow() but we'd need a new API to avoid that.
This change is