Skip to content

Commit

Permalink
disable memmap as requested
Browse files Browse the repository at this point in the history
  • Loading branch information
KedoKudo committed Sep 5, 2024
1 parent 389cd08 commit 6996a91
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/imars3d/backend/dataio/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,17 @@ def _load_images(filelist: List[str], desc: str, max_workers: int, tqdm_class) -
file_ext = Path(filelist[0]).suffix.lower()
if file_ext in (".tif", ".tiff"):
# use tifffile directly for a faster loading
reader = partial(tifffile.imread, out="memmap")
# NOTE: Test conducted on 09-05-2024 on bl10-analysis1 shows that using
# memmap is faster, which contradicts the observation from the instrument
# team.
# | Method | Time (s) |
# |--------|----------|
# | `imread(out="memmap")` | 2.62 s ± 24.6 ms |
# | `imread()` | 3.59 s ± 13.6 ms |
# The `memmap` option is removed until we have a better understanding of the
# discrepancy.
# reader = partial(tifffile.imread, out="memmap")
reader = tifffile.imread
elif file_ext == ".fits":
reader = dxchange.read_fits
else:
Expand Down

0 comments on commit 6996a91

Please sign in to comment.