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

See what happens if we don't track thrift i32 #925

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

martindurant
Copy link
Member

@martindurant martindurant commented May 27, 2024

This change improves local file opening speed by 15% for large metadata (including byte reading and thrift parsing, but only the latter is actually affected).

This will cause data corruption in the case that a thrift object is directly written from one that is read, rather than created afresh. I believe this only happens in ParquetFile.remove/write_row_groups , which (rare events) must make sure to add i32 fields to the object dictionaries.

>>> pf = fastparquet.ParquetFile("test-data/root/DY1JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8.root.parquet")
>>> %timeit pf = fastparquet.ParquetFile("test-data/root/DY1JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8.root.parquet")

# this PR
27.8 ms ± 240 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
# main
34.4 ms ± 294 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

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.

1 participant