-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance degradation following 0.12.1 release #183
Comments
Just going out on a hunch, but could you test with a Git dependency using the branch from #181 ? Thanks! |
that one?
|
no, 222b01a doesn't change any behavior, it just adds a failing unit test. 12836a9 changes behavior. Otherwise, the 0.12.0 to 0.12.1 is only a few commits - you could try doing a |
You could also try rstar = { git = "https://github.com/georust/rstar.git", branch = "new-empty-min-max" } |
But yeah, this would certainly be the most thorough solution. |
idk why, but i get compiler errors when trying to use git dependency error[E0277]: the trait bound `rstar::primitives::GeomWithData<geo::Point, std::option::Option<petgraph::prelude::NodeIndex>>: rstar::RTreeObject` is not satisfied
--> cascade-core/src/connectors.rs:62:12
|
62 | tree: &RTree<IndexedPoint>,
| ^^^^^^^^^^^^^^^^^^^ the trait `rstar::RTreeObject` is not implemented for `rstar::primitives::GeomWithData<geo::Point, std::option::Option<petgraph::prelude::NodeIndex>>`
|
= help: the trait `rstar::RTreeObject` is implemented for `rstar::primitives::GeomWithData<R, T>`
note: required by a bound in `rstar::RTree`
--> /home/chingiz/.cargo/git/checkouts/rstar-526d45c905f9146e/4c16830/rstar/src/rtree.rs:167:8
|
164 | pub struct RTree<T, Params = DefaultParams>
| ----- required by a bound in this struct
...
167 | T: RTreeObject,
| ^^^^^^^^^^^ required by this bound in `RTree` |
Possibly because you have to use the same dependency in the |
You should be overiding using a |
Seems like perf drops after 84d1265. With |
- [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `rstar/CHANGELOG.md` if knowledge of this change could be valuable to users. --- This reverts back to the min/max representation of empty AABB due to regressions introduced by the numerically more tame but not invariant for merging representation. To avoid regressing #161, it also adds a single check to avoid computing the distance to an empty envelope (of the root node of an empty tree). Integer coordinates are always prone to overflow but in the empty case we are forcing this onto the caller whereas every non-empty tree will have AABB that the caller supplied and where we can reasonably ask them to control for overflow or use a custom `Point` impl based on saturating arithmetic. Fixes #183
After upgrading the Rstar crate from version 0.12 to 0.12.1, I've experienced a dramatic slowdown in performance when using
.nearest_neighbor
in my public transit graph application. The operation, which connects all transit stops to the nearest street nodes, has slowed from ~50ms to over 30 seconds. All geometries are f64geo-types
points.-- Expected Performance: ~2-5μs per
.nearest_neighbor
call (as observed with version 0.12)-- Observed Performance: 10-20ms per
.nearest_neighbor
call with version 0.12.1-- Change: Only the Rstar crate version was updated (from 0.12 to 0.12.1).
Cargo Flamegraph profiling didn’t pinpoint the issue due to heavy interference from Polars-related calls.
The text was updated successfully, but these errors were encountered: