-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: add benchmarks for json parser #9107
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
Conversation
arrow-json/benches/wide_object.rs
Outdated
| c.bench_function("decode_wide_object_i64_json", |b| { | ||
| b.iter(|| { | ||
| let mut decoder = ReaderBuilder::new(schema.clone()) | ||
| .with_batch_size(1024) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend using batch size of 4k or 8k to better mirror production
Also then I would recommend using like 128k input rows perhaps
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Weijun-H
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Weijun-H
Any chance you are willing to make them all a single benchmark (called json-reader.rs)? If not no worries, I can consolidate them as a follow on PR
…creased row and batch sizes
…rojection files and adding json-reader benchmark
b0e2f1d to
fbf50de
Compare
|
Thank you @Weijun-H |
# Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. --> - Closes #NNN. # Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> Add targeted JSON reader benchmarks to track performance for wide objects, hex-encoded binary inputs, and projection workloads. # What changes are included in this PR? - Add `arrow-json/benches/wide_object.rs` for wide-object decode/serialize benchmarks. - Add `arrow-json/benches/binary_hex.rs` for hex string decoding into Binary/FixedSizeBinary/BinaryView. - Add `arrow-json/benches/wide_projection.rs` for full vs projected schema decoding. <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> # Are these changes tested? No <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> # Are there any user-facing changes? No <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. If there are any breaking changes to public APIs, please call them out. -->
Which issue does this PR close?
Rationale for this change
Add targeted JSON reader benchmarks to track performance for wide objects, hex-encoded binary inputs, and projection workloads.
What changes are included in this PR?
arrow-json/benches/wide_object.rsfor wide-object decode/serialize benchmarks.arrow-json/benches/binary_hex.rsfor hex string decoding into Binary/FixedSizeBinary/BinaryView.arrow-json/benches/wide_projection.rsfor full vs projected schema decoding.Are these changes tested?
No
Are there any user-facing changes?
No