You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parallel tile decode gate excludes the default tile_size=256 #1551
The parallel tile decode path in xrspatial/geotiff/_reader.py (around line 1091) is gated by:
use_parallel= (n_tiles>1andtile_pixels>64*1024)
For the default tile_size=256, tile_pixels = 256 * 256 = 65536, which is exactly 64 * 1024. The strict > fails by one, so the sequential path runs even with 16+ tiles. The parallel decode only fires for tile_size > 256, but 256 is the default that most real GeoTIFFs ship with. The gate is closed on the most common case.
Expected behavior
The threshold should be >= so the default tile size engages parallel decode. The comment next to the line says the threshold is meant to "avoid pool overhead on small 64x64 / 128x128 tile reads" - 256x256 should clear it, not land on it.
Fix
One-character change:
use_parallel= (n_tiles>1andtile_pixels>=64*1024)
Additional context
Found during an efficiency audit pass over the geotiff module on 2026-05-09.
Activity
Engage parallel tile decode for default tile_size=256 (#1551) (#1557)
Address review feedback on _decode extraction (#2246)
Address review feedback on _decode extraction (#2246)
Refactor GeoTIFF Phase 5b: extract _decode.py from _reader.py (#2254)
geotiff tests: consolidate tile / strip decode cluster (#2453)