Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/import-array-parse-once.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
---

fix(import): parse each JSON array element once, however many reads it spans (#1101)

The array reader re-parsed an incomplete element from its first byte after every 8 KiB read, so importing a large event cost time quadratic in its size. It now scans for the element's end as bytes arrive, keeping that scan's state across reads, and hands the element to `serde_json` once it is complete. An unfinished element is also tried each time it doubles, so a malformed one still fails without the reader buffering the rest of the input, and the parsing stays linear. Error messages for malformed or truncated input are unchanged. A bare number split across two reads is no longer cut at the read boundary. Rust-only; no published package changes.
Loading
Loading