Skip to content

docs: rewrite write performance/ingestion section#313

Open
wjones127 wants to merge 5 commits into
mainfrom
docs/rewrite-write-performance
Open

docs: rewrite write performance/ingestion section#313
wjones127 wants to merge 5 commits into
mainfrom
docs/rewrite-write-performance

Conversation

@wjones127

@wjones127 wjones127 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Alternative to #312. That PR documented write_parallelism as primarily a memory-capping knob for wide rows and didn't mention the built-in progress bar or the tradeoffs of streaming a RecordBatchReader vs. a file-backed Dataset. This PR rewrites the Ingestion section of docs/performance.mdx instead:

  • write_parallelism's main benefit is write bandwidth: more partitions means more concurrent writes, up to the CPU core count.
  • Documents progress=True, which shows a live tqdm bar with throughput (MB/s) and active worker count — currently undocumented anywhere — including a sample of what the output looks like.
  • Clarifies that for larger-than-memory data, scanning a file-backed Dataset is preferable to a hand-built RecordBatchReader: only a Dataset can be counted and rescanned, which lets LanceDB auto-size parallelism and retry a failed write. A reader can only be consumed once, so neither is possible.
  • Narrows iterator ingestion to its actual use case — data that needs per-row work before it can be written (e.g. applying a custom transformation as you ingest) — rather than "streaming" generally, and drops the memory framing (iterator ingestion isn't about memory).
  • Adds a note under iterator ingestion for setting write_parallelism manually on large inputs, since LanceDB can't auto-size it without a countable/rescannable source, including a rule of thumb — budget one unit of parallelism per ~100K rows or ~1 GB, to avoid fragmenting small datasets.

Test plan

Reworks the Ingestion section on the Performance Tips page:

- Frames write_parallelism around its main benefit (bandwidth), not
  just memory, and documents the progress=True tqdm bar (throughput
  and active worker count) that was previously undocumented.
- Clarifies that for larger-than-memory data, scanning a file-backed
  Dataset is preferable to a hand-built RecordBatchReader: only a
  Dataset can be counted and rescanned, which enables auto-sized
  parallelism and retry-on-failure.
- Adds write_parallelism guidance for iterator ingestion, where LanceDB
  can't auto-size it, including a rule of thumb to avoid over-
  fragmenting small datasets.

Alternative to #312, which framed write_parallelism as primarily a
memory-capping knob and didn't mention the progress bar.
@mintlify

mintlify Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lancedb-bcbb4faf 🟢 Ready View Preview Jul 17, 2026, 6:14 PM

@mintlify

mintlify Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lancedb-bcbb4faf 🟡 Building Jul 17, 2026, 6:13 PM

Drops the memory-bound framing (iterator ingestion isn't really about
memory) and scopes the section to data that needs per-row work before
writing, rather than streaming sources generally. Calls out setting
write_parallelism manually for large inputs in its own note.
Trims repeated reasoning (bandwidth benefit, Dataset vs RecordBatchReader
rescan/retry logic) that was restated across paragraphs.
Embedding computation is built into the ingestion pipeline, so it's a
misleading example of when you'd need to hand-roll an iterator instead
of scanning a file-backed Dataset. Swaps it for a generic "custom data
transformations" example in both places it appeared.

Also drops the wide-row scan memory bounding note for now.
@wjones127
wjones127 marked this pull request as ready for review July 17, 2026 20:56
@wjones127
wjones127 requested a review from AyushExel July 17, 2026 20:56
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.

1 participant