Skip to content

[pull] main from apache:main - #947

Merged
pull[bot] merged 1 commit into
sysfce2:mainfrom
apache:main
Sep 28, 2026
Merged

pull[bot] merged 1 commit into
sysfce2:mainfrom
apache:main

Conversation

@pull

@pull pull Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

### Rationale for this change

Resolves #51470:

`simdjson` has a multi-stage parser that first finds structural elements in the entire buffer (including document boundaries). Only the second stage, which is lazy, actually need to parse the documents.

Similarily `parse_many` already computes all document boundaries and we can iterate its output to consume the documents without parsing any documents:
https://github.com/simdjson/simdjson/blob/6913ee1a17a57d23a2e9f458d8e04e96cd43ecab/doc/parse_many.md?plain=1#L85-L88

### What changes are included in this PR?

This delimits JSON documents without fully parsing them

### Are these changes tested?

Yes.

before:

```
ChunkJSONPrettyPrinted                                             528656 ns       528396 ns         1340 
bytes_per_second=394.823Mi/s json_size=218.757k
ChunkJSONPrettyPrintedMultipleBlocks                               664758 ns       625186 ns         1143 block_size=27.344k 
bytes_per_second=333.697Mi/s json_size=218.757k
```

after:

```
ChunkJSONPrettyPrinted                                              91815 ns        91811 ns         7358 
bytes_per_second=2.21906Gi/s json_size=218.757k
ChunkJSONPrettyPrintedMultipleBlocks                               197358 ns       167654 ns         3719 block_size=27.344k 
bytes_per_second=1.2152Gi/s json_size=218.757k
```

### Are there any user-facing changes?

No.

### Was AI used for this PR?

In accordance to the [AI generation guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code), please disclose below whether and how AI was used in this PR.

**PR code and description written by:**

- [X] Human
- [ ] (AI assisted in code drafting for the initial version)

**Reviewed before submission by:**

- [X] Human
- [ ] AI
- [ ] Not reviewed

* GitHub Issue: #51470

Authored-by: Alexander Taepper <alexander.taepper@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
@pull pull Bot locked and limited conversation to collaborators Sep 28, 2026
@pull pull Bot added the ⤵️ pull label Sep 28, 2026
@pull
pull Bot merged commit 65974f5 into sysfce2:main Sep 28, 2026
3 of 38 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant