Files
lancedb/python/python
jasonz-lance ecf44fed4a feat(python): prefetch upcoming blocks in the background for 2-phase reads
_TwoPhaseSplitReader now schedules background fetches for the next few
not-yet-loaded blocks the read plan is about to need, via a small
private ThreadPoolExecutor sized by prefetch_depth (wired to
io_queue_depth). A later __getitems__ call usually finds the block
already fetched instead of blocking on storage, overlapping this
split's own I/O with whatever is consuming its previous blocks -- the
same benefit io_queue_depth already gives 1-phase, now extended inside
a single 2-phase split too.

Each reader's executor is shut down via a new close() method, called
from _iter_owned's cleanup (and _estimate_blocks_per_epoch's sampling
loop) since a fresh set of readers is built on every iteration.
2026-09-30 13:49:16 -07:00
..