Kontinuation commented on code in PR #53:
URL: https://github.com/apache/sedona-db/pull/53#discussion_r2338450693


##########
rust/sedona-spatial-join/src/index.rs:
##########
@@ -271,6 +292,10 @@ impl SpatialIndexBuilder {
             ConcurrentReservation::try_new(REFINER_RESERVATION_PREALLOC_SIZE, 
refiner_reservation)
                 .unwrap();
 
+        // Pre-compute geometries for KNN queries to avoid repeated 
WKB-to-geometry conversions
+        let (cached_geometries, cached_geometry_positions) =
+            Self::build_cached_geometries(&self.indexed_batches);

Review Comment:
   Additionally memory needs to be reserved for cached geometries. It is hard 
to know the exact amount of memory taken by `geo::Geometry` objects, but at 
least we can have a rough estimation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to