feat: Add arro3 Cargo feature to pyo3-arrow#478
Open
hombit wants to merge 1 commit intokylebarron:mainfrom
Open
feat: Add arro3 Cargo feature to pyo3-arrow#478hombit wants to merge 1 commit intokylebarron:mainfrom
arro3 Cargo feature to pyo3-arrow#478hombit wants to merge 1 commit intokylebarron:mainfrom
Conversation
2c80a4a to
b82f694
Compare
b82f694 to
2e76594
Compare
arro3 Cargo feature to pyo3-arrowarro3 Cargo feature to pyo3-arrow
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.
I gated all Python interface (
arro3-core) specifics under thearro3Cargo feature. Basically, I hid all#[pymethods]and then refactored the Rust interface code that was using Python methods.When I started this PR, I was hoping to reduce compilation time and extension library size for the users of
pyo3-arrow, but it actually didn’t work well. Most of the gated crates are still transitive dependencies througharrow-*crates, which do not gate them over Cargo features. However, turning offarro3feature would remove seven dependencies. I benchmarked the changes with a testmaturinproject, which just implements a single method from thepyo3-arrowdocs, andmaturin build --releasetimes reduced by 5–10%, while the wheel size changed by only 150 kB. I tried with default linking settings and withlto = true; codegen-units = 1, but the differences with and without the newarro3feature don’t depend on these settings.I’ll let you decide if these changes are useful.
Fixes #477, fixes #395