docs: rewrite write performance/ingestion section#313
Open
wjones127 wants to merge 5 commits into
Open
Conversation
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.
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
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
marked this pull request as ready for review
July 17, 2026 20:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Alternative to #312. That PR documented
write_parallelismas primarily a memory-capping knob for wide rows and didn't mention the built-in progress bar or the tradeoffs of streaming aRecordBatchReadervs. a file-backedDataset. This PR rewrites the Ingestion section ofdocs/performance.mdxinstead:write_parallelism's main benefit is write bandwidth: more partitions means more concurrent writes, up to the CPU core count.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.Datasetis preferable to a hand-builtRecordBatchReader: only aDatasetcan 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.write_parallelismmanually 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