-
Notifications
You must be signed in to change notification settings - Fork 0
JSONL inspection validation policy: per-line json.loads costs 5.5x at 100 MB #89
Copy link
Copy link
Closed
Labels
area:storageStorage adapter abstraction + filesystem adaptersStorage adapter abstraction + filesystem adaptersenhancementNew feature or requestNew feature or requestpriority:p2Do after evidence or dependency gates; optional portability capabilityDo after evidence or dependency gates; optional portability capabilityv0.2.NEXTCommitted for a future 0.2.x release; not yet pinned to 0.2.4/0.2.5Committed for a future 0.2.x release; not yet pinned to 0.2.4/0.2.5v0.2.xHotMem post-v0.2 follow-up workHotMem post-v0.2 follow-up work
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
area:storageStorage adapter abstraction + filesystem adaptersStorage adapter abstraction + filesystem adaptersenhancementNew feature or requestNew feature or requestpriority:p2Do after evidence or dependency gates; optional portability capabilityDo after evidence or dependency gates; optional portability capabilityv0.2.NEXTCommitted for a future 0.2.x release; not yet pinned to 0.2.4/0.2.5Committed for a future 0.2.x release; not yet pinned to 0.2.4/0.2.5v0.2.xHotMem post-v0.2 follow-up workHotMem post-v0.2 follow-up work
Summary
Decide the JSONL inspection validation policy:
_streamcurrently paysjson.loadson every line, which dominates inspection cost.Measured impact (spike #48, PR #84, B2)
At 100 MB: full per-line validation = 1,740 ms median; scan-only = 319 ms (~5.5x). Validation is the cost, not scanning. A C scanner clears 3.55x, but the spike's conclusion (#48) is no native helper yet — the pure-Python policy change captures most of the win.
Options (semantics decision needed)
sample_size) — cheap, weaker guarantees.Acceptance criteria
FileInspection.unsupported_reason/row_countguarantees and API/MCP/CLI consumers).bench/native_spike/results.jsonbaseline.Context
Spike recommendation follow-up #4:
bench/native_spike/README.md. Related: #48, #53 (closed — original inspector ticket).