scverse / spatialdata

An open and interoperable data framework for spatial omics data
https://spatialdata.scverse.org/
BSD 3-Clause "New" or "Revised" License
236 stars 45 forks source link

Benchmark geopandas query methods #742

Open LucaMarconato opened 2 weeks ago

LucaMarconato commented 2 weeks ago

A solution would be to benchmark the polygon query and bounding box implementation for points and shapes and see if one is significantly faster than the other. Ideally the polygon query is fast enough and we can drop the bounding box query implementation for points and shapes.

Note that polygon query implementation for raster types is simply calling the implementation of bounding box query for raster types; this will not change.

Originally posted by @LucaMarconato in #669

I add also that it would be interesting to benchmark the code against pure geopandas code, to see if the spatialdata code introduces some bottlenecks. I suspect that the code in spatialdata is slightly slower, but by enabling spatial partitioning on write by default, we could obtain that, when writing and reading the data, we actually get a performance improvement over vanilla geopandas.

LucaMarconato commented 2 weeks ago

Linked to this https://github.com/scverse/spatialdata/issues/724 (using cuspatial as an optional way to accelerate operations).