Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common_chunks on SubDiskArray can be a large fraction of io cost #222

Closed
rafaqz opened this issue Feb 5, 2025 · 2 comments · Fixed by #224
Closed

common_chunks on SubDiskArray can be a large fraction of io cost #222

rafaqz opened this issue Feb 5, 2025 · 2 comments · Fixed by #224

Comments

@rafaqz
Copy link
Collaborator

rafaqz commented Feb 5, 2025

Image

This is where the left hand side of the broadcast is a Matrix and the right is a SubDiskArray

Probably common_chunks should never be called for this case?

(for context this is completely killing the performance reading thousands of 500*500 windows from a large lazy disk array into a preallocated matrix)

@rafaqz
Copy link
Collaborator Author

rafaqz commented Feb 5, 2025

Additionally the same common_chunks call is being made at multiple levels

@rafaqz rafaqz changed the title resolve_indices on SubDiskArray can be a large fraction of io cost for smallish views common_chunks on SubDiskArray can be a large fraction of io cost for smallish views Feb 5, 2025
@rafaqz rafaqz changed the title common_chunks on SubDiskArray can be a large fraction of io cost for smallish views common_chunks on SubDiskArray can be a large fraction of io cost Feb 5, 2025
@rafaqz
Copy link
Collaborator Author

rafaqz commented Feb 5, 2025

I guess the problem is TIFF defaulting to 1 chunk per column, so there are very many chunks covered by a small window.

julia> DiskArrays.eachchunk(rast.qualities)
1×31824 DiskArrays.GridChunks{2, Tuple{DiskArrays.RegularChunks, DiskArrays.RegularChunks}}:
 (1:25811, 1:1)  (1:25811, 2:2)  (1:25811, 3:3)  (1:25811, 4:4)  (1:25811, 5:5)    (1:25811, 31822:31822)  (1:25811, 31823:31823)  (1:25811, 31824:31824)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant