Latency problem with raster calcul

There are two ways of improving that:

  • Better algorithms.
  • Better hardware.

What kind of python object is the raster that you have?