Skip to content

Conversation

@Weijun-H
Copy link
Member

@Weijun-H Weijun-H commented Jan 7, 2026

Which issue does this PR close?

  • Closes #NNN.

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?

  • 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.

Are these changes tested?

No

Are there any user-facing changes?

No

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jan 7, 2026
@Weijun-H Weijun-H marked this pull request as draft January 7, 2026 17:30
@Weijun-H Weijun-H changed the title feat: add benchmark for decoding and serializing wide JSON objects feat: add benchmark for json parse Jan 7, 2026
c.bench_function("decode_wide_object_i64_json", |b| {
b.iter(|| {
let mut decoder = ReaderBuilder::new(schema.clone())
.with_batch_size(1024)
Copy link
Contributor

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

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thanks @Weijun-H

@Weijun-H Weijun-H marked this pull request as ready for review January 7, 2026 17:42
@alamb alamb changed the title feat: add benchmark for json parse feat: add benchmarks for json parser Jan 7, 2026
Copy link
Contributor

@alamb alamb left a 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

@Weijun-H Weijun-H force-pushed the json-wide-tabe-bench branch from b0e2f1d to fbf50de Compare January 8, 2026 08:28
@alamb alamb merged commit 73bbfee into apache:main Jan 8, 2026
24 checks passed
@alamb
Copy link
Contributor

alamb commented Jan 8, 2026

Thank you @Weijun-H

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants