Skip to content

Stream JSON report I/O#116

Merged
steve-the-edwards merged 1 commit into
mainfrom
sedwards/stream-json-reports
Jul 22, 2026
Merged

Stream JSON report I/O#116
steve-the-edwards merged 1 commit into
mainfrom
sedwards/stream-json-reports

Conversation

@steve-the-edwards

Copy link
Copy Markdown
Collaborator

Large Gradle builds can exhaust their heap when encodeToString materializes aggregate report payloads alongside the collected model.

  • Stream JSON and JavaScript report payloads directly to their output files.
  • Stream intermediate and historical JSON reads instead of loading whole-file strings.
  • Count serialized bytes without materializing strings when deciding stat chunk boundaries.
  • Preserve the existing UTF-8 JSON and JavaScript output byte-for-byte.
Additional context

Aggregate report serialization keeps the full collected model live. Streaming file-backed JSON conversions removes the additional growable JSON string from peak heap usage. Browser-side string conversions remain where Kotlin/JS APIs require JavaScript strings.

@steve-the-edwards
steve-the-edwards merged commit f66f3fc into main Jul 22, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants