Breakout user-guide, add num_sample param option to natural_breaks(), fix slow import#123
Conversation
|
@thuydotm Looks like there is a Also, I'm happy merging this and then we can experiment with cache parameter separately |
|
@brendancol interesting, as I investigated from Numba documentation, we can set |
|
Here I tried to import the package and run %time import xrspatial
%time viewshed(normal_agg, OBSERVER_X, OBSERVER_Y)
# first run
import time: 16 s
viewshed run time: 3.11 s
# 2nd run after restarting the kernel
import time: 5.07 s
viewshed run time: 2.94 s
# first run
import time: 4.24 s
viewshed run time: 18.2 s
# 2nd run after restarting the kernel
import time: 4.2 s
viewshed run time: 2.94 sBy setting |
|
I thought that Numba caching is persisted indefinitely, i.e. unrelated to any kernel restarts, and not using memory (just disk). As I understood it, it would be cached the first time you import that code on a given system, then it would be reused. We tried enabling it globally within Datashader but had various issues, so it's great if it can be enabled in xarray-spatial and spatialpandas instead (which is where Datashader's import slowdowns were coming from at the time). |
|
@jbednar Thanks for pointing out. I've seen a setting for numba cache, |
|
Datashader has a convenience utility |
|
@thuydotm Lazy compilation with cache=True sounds perfectly fine. |
|
We have almost all tests passed when setting |

No description provided.