rust-s2
rust-s2 copied to clipboard
Large Memory Consumption on Region Covering
While trying to cover a region of lat lon (Lat: -37 -> -38, Lon: 147 -> 148), While getting all the CellIds in that region. The function call seems to use approx 2.5gb of RAM, which what should be approx 200mb.
Reproduction code:
let coverer = s2::region::RegionCoverer {
min_level: 19,
max_level: 19,
level_mod: 0,
max_cells: usize::MAX,
};
let rect = s2::rect::Rect::from_degrees(
-38.0,
144.0,
-37.0,
145.0,
);
let children_cells = coverer.covering(&rect).0;