I’m working on a project1 that requires splitting a large raster into a few thousand overlapping chunks and iteratively processing and accumulating each result into an output raster. After finding my naive Xarray implementation for accumulating results was painfully slow, I decided to spend some time benchmarking different approaches. Below, I go through three different strategies that ultimately reduced processing time from a couple hours to a few minutes. Using an Outer Arithmetic Join By...