Skip to content

feat(helpers): streaming bulk-ingest with bounded memory - #495

Draft
margaretjgu wants to merge 2 commits into
mainfrom
feat/bulk-ingest-streaming
Draft

feat(helpers): streaming bulk-ingest with bounded memory#495
margaretjgu wants to merge 2 commits into
mainfrom
feat/bulk-ingest-streaming

Conversation

@margaretjgu

Copy link
Copy Markdown
Member

Replaces the buffered readFileSync + splitIntoBatches approach with line-by-line streaming bounded to flush_bytes * concurrency bytes, so ingesting large files no longer requires loading the full dataset into memory. Concurrency is controlled with a semaphore that provides backpressure. NDJSON, JSON arrays, and CSV are all supported.

Closes #443

@github-actions

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Error

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 0.62s
✅ REPOSITORY gitleaks yes no no 35.79s
✅ REPOSITORY git_diff yes no no 0.29s
✅ REPOSITORY secretlint yes no no 17.48s
✅ REPOSITORY trivy yes no no 10.75s
❌ TYPESCRIPT eslint 2 1 0 2.36s

Detailed Issues

❌ TYPESCRIPT / eslint - 1 error
test/es/helpers/bulk-ingest.test.ts
  92:42  error  Empty block statement  no-empty

✖ 1 problem (1 error, 0 warnings)

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@margaretjgu
margaretjgu marked this pull request as draft July 31, 2026 20:53
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.

perf(es): bulk-ingest buffers all input into memory; OOMs on large dumps

1 participant