diff --git a/reader/MarCCD.cpp b/reader/MarCCD.cpp index 114cf9a16..4f1ab03f5 100644 --- a/reader/MarCCD.cpp +++ b/reader/MarCCD.cpp @@ -306,7 +306,9 @@ Header ReadRaw(const std::string &path, uint16_t *out, size_t capacity) { throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds, path + ": image is larger than the buffer given for it"); - TIFF *tiff = TIFFOpen(path.c_str(), "r"); + // "m": read, not memory-mapped. On macOS a mapped 32 MB frame is paged in under the copy out of it, as + // page faults (a fifth of the image passes' busy CPU samples on 4nwv); the same bits either way. + TIFF *tiff = TIFFOpen(path.c_str(), "rm"); if (tiff == nullptr) throw JFJochException(JFJochExceptionCategory::TIFFGeneratorError, "Cannot open TIFF " + path); struct Closer {