datashader icon indicating copy to clipboard operation
datashader copied to clipboard

cache numba's functions

Open mikilterribile opened this issue 1 year ago • 10 comments

Hi everyone,

I have been using Datashader with Matplotlib to create dynamic visualizations of large vectors (shapefiles). The approach works fine, but each time I start the program, Numba's functions for creating the canvas and the shaded image are compiled by Numba, resulting in a 6-7 second overhead.

I wonder if it's possible to enable caching (for instance, setting use_cache=True) in the @njit decorator for the function, and whether there is a general solution to overcome this problem.

Thank you in advance for your attention.

Best regards, Michele Zucchelli.

mikilterribile avatar Mar 01 '24 12:03 mikilterribile

Yes, this is an issue. Definitely needs addressing!

jbednar avatar Mar 01 '24 16:03 jbednar

ok thank you for your answer

mikilterribile avatar Mar 03 '24 11:03 mikilterribile