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

perf: Remove temporary allocations in Parquet #18013

Merged

Conversation

coastalwhite
Copy link
Collaborator

This removes more than 50% of the temporary allocations in the Parquet readers. The only temporary allocations left are in the Thrift definitions and the polars_io code.

This removes more than 50% of the temporary allocations in the Parquet readers.
The only temporary allocations left are in the Thrift definitions and the
`polars_io` code.
@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars labels Aug 2, 2024
Copy link

codecov bot commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 37.77778% with 28 lines in your changes missing coverage. Please review.

Project coverage is 80.47%. Comparing base (d5265d3) to head (b27fedc).
Report is 1 commits behind head on main.

Files Patch % Lines
...tes/polars-parquet/src/parquet/read/page/stream.rs 0.00% 21 Missing ⚠️
...tes/polars-parquet/src/parquet/read/page/reader.rs 63.15% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18013      +/-   ##
==========================================
- Coverage   80.49%   80.47%   -0.02%     
==========================================
  Files        1496     1496              
  Lines      196786   196806      +20     
  Branches     2817     2817              
==========================================
- Hits       158407   158389      -18     
- Misses      37858    37896      +38     
  Partials      521      521              

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

@@ -201,10 +201,11 @@ impl<'a> BinaryStateTranslation<'a> {
}

pub(crate) fn deserialize_plain(values: &[u8], num_values: usize) -> BinaryDict {
let all = BinaryIter::new(values, num_values).collect::<Vec<_>>();
Copy link
Member

Choose a reason for hiding this comment

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

Wow.. that was unneeded.

Copy link
Member

@ritchie46 ritchie46 left a comment

Choose a reason for hiding this comment

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

Nice one. Seemed rather low hanging fruit as well. 👍

@ritchie46 ritchie46 merged commit 6259ea4 into pola-rs:main Aug 4, 2024
22 checks passed
@coastalwhite coastalwhite deleted the reduce-parquet-memory-consumption branch August 4, 2024 08:06
@c-peters c-peters added the accepted Ready for implementation label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants