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

[jdbc.row] Reduce allocations in fetch-all-columns! #190

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

alexander-yakushev
Copy link
Contributor

@alexander-yakushev alexander-yakushev commented Oct 8, 2024

This doesn't look much like an improvement but it actually removes two sources of allocations per each row – the LongRange and the lambda created by partial. This accounts for ~10% of allocations in my "select 10k rows" benchmark, and it costs nothing to optimize it (except maybe a bit of readability).

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.59%. Comparing base (352d181) to head (b644d7b).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #190      +/-   ##
==========================================
+ Coverage   83.58%   83.59%   +0.01%     
==========================================
  Files          37       37              
  Lines        2497     2499       +2     
  Branches      212      212              
==========================================
+ Hits         2087     2089       +2     
  Misses        198      198              
  Partials      212      212              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@camsaul camsaul left a comment

Choose a reason for hiding this comment

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

Cool. Thanks for the explanation of the performance impact

@camsaul camsaul merged commit 3729d20 into camsaul:master Oct 14, 2024
10 checks passed
@alexander-yakushev alexander-yakushev deleted the fetch-all-loop branch October 14, 2024 17:35
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.

2 participants