Skip to content

Speed Issue loading large .tiff images #167

@Gioosu

Description

@Gioosu

Hi,

I need to load large images, each one larger than 2GB. The normal loading time is approximately 9 minutes, but I suppose I could achieve better performance. Reading some other posts, I found this: #79.

I also read something about Garbage Collector overhead, but deactivating it while loading images didn't improve the performance.

So, I tried using load(tiff_path; lazyio = true), but I encountered this error:

ERROR: Unable to mutate inplace since this array is on disk. Convert to a mutable in-memory version by running `copy(arr)`. 

𝗡𝗼𝘁𝗲: For large files this can be quite expensive. A future PR will add support for writing inplace to disk. See `push!` for appending to an array.

Here is a minimal code example to reproduce the issue:

# Path to the large image
tiff_path = "path/to/large_image.tiff"

# Attempt to load the image with lazy IO
try
    img = load(tiff_path; lazyio = true)
catch e
    println("Error: ", e)
end

Am I getting something wrong? Did I misunderstand how to use lazyio properly?

Any advice or suggestions would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions