We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49b25b3 commit 4b9a500Copy full SHA for 4b9a500
1 file changed
src/mdio/segy/blocked_io.py
@@ -110,11 +110,14 @@ def to_zarr( # noqa: PLR0913, PLR0915
110
111
segy_file = SegyFile(**segy_file_kwargs)
112
113
+ # Load in-memory Zarr grid map to NumPy array once to avoid Zarr slicing overhead in the submission loop
114
+ grid_map_np = grid_map[:]
115
+
116
with executor:
117
futures = []
118
for region in chunk_iter:
119
region_slices = tuple(region.values())
- local_grid_map = grid_map[region_slices[:-1]]
120
+ local_grid_map = grid_map_np[region_slices[:-1]]
121
# Pass zarr array handles and local grid map slice to workers
122
future = executor.submit(
123
trace_worker,
0 commit comments