spatialdata-notebooks icon indicating copy to clipboard operation
spatialdata-notebooks copied to clipboard

add speed up demonstration of datashader

Open Sonja-Stockhaus opened this issue 1 year ago • 8 comments

Little benchmark to demonstrate in which cases it is helpful to use datashader to increase rendering speed

Sonja-Stockhaus avatar Jul 30 '24 09:07 Sonja-Stockhaus

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Thanks for the PR, this is very informative! Just a few minor comments:

  • [x] I'd remove the variables mpl_sds and ds_sds as they are not used (also, maybe you have already seen, the developers don't recommend to compute these statistics https://docs.python.org/3/library/timeit.html#timeit.Timer.repeat).
  • [x] The empirical indication that for ~1000 polygons on datashader is faster is very useful! Could you please also add a section to check this for points and circles?

Thanks a lot!

LucaMarconato avatar Jul 31 '24 16:07 LucaMarconato

  • [x] Regarding the failing docs, it seems that it can be fixed by using this myst configuration setting: https://github.com/executablebooks/MyST-Parser/issues/519#issuecomment-1037239655, in conf.py.

LucaMarconato avatar Jul 31 '24 16:07 LucaMarconato

We actually already seem to have that. Will try to remove the HTML logic

timtreis avatar Sep 12 '24 20:09 timtreis

@Sonja-Stockhaus @LucaMarconato I fixed some things that were causing warnings in other notebooks. Apparently, this fixed it.

timtreis avatar Sep 12 '24 21:09 timtreis

@Sonja-Stockhaus I modified your notebook slightly to have less redundant code. For testing I reduced the number of points. Will rerun over-night with enough Points to see the effect.

However, for merging I'd wait until your main PR is merged because I want these to be real version accessible from PyPi. image

timtreis avatar Sep 12 '24 21:09 timtreis

@timtreis ready to merge??

LucaMarconato avatar Sep 27 '24 08:09 LucaMarconato

Not yet. On the one hand is datashader not faster for points, so that's weird. And then I wanted to first release sonjas feature branch so that the watermark has an actual release version attached and not a GitHub commit

timtreis avatar Sep 27 '24 18:09 timtreis