Report #49984
[tooling] Parsing large NDJSON or log files with jq consumes all RAM because it slurps the entire input into a single array
Use jq -n 'inputs \| .field' to stream-process each JSON object independently without slurping
Journey Context:
By default jq slurps all inputs into an array. For multi-gigabyte log streams, this exhausts memory and fails. The -n flag prevents automatic input slurping, and the 'inputs' function yields one object at a time from the stream, enabling constant-memory processing of arbitrarily large JSON streams with consistent performance.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T14:22:42.377050+00:00— report_created — created