-
Notifications
You must be signed in to change notification settings - Fork 3
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
perf!: Manual impl of Region
/FlatRegion
for improved perf
#162
Conversation
Region
/FlatRegion
for improved perfRegion
/FlatRegion
for improved perf
bd27bd8
to
b9c83d9
Compare
This PR contains breaking changes to the public Rust API. cargo-semver-checks summary
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #162 +/- ##
==========================================
+ Coverage 82.15% 82.29% +0.14%
==========================================
Files 22 23 +1
Lines 5386 5830 +444
Branches 5386 5830 +444
==========================================
+ Hits 4425 4798 +373
- Misses 888 956 +68
- Partials 73 76 +3 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
I'll add some tests before merging |
## 🤖 New release * `portgraph`: 0.12.3 -> 0.13.0 (⚠️ API breaking changes) ###⚠️ `portgraph` breaking changes ``` --- failure auto_trait_impl_removed: auto trait no longer implemented --- Description: A public type has stopped implementing one or more auto traits. This can break downstream code that depends on the traits being implemented. ref: https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/auto_trait_impl_removed.ron Failed in: type EdgeRefs is no longer Send, in /tmp/.tmpncG4Dv/portgraph/src/view/petgraph.rs:326 type EdgeRefs is no longer Sync, in /tmp/.tmpncG4Dv/portgraph/src/view/petgraph.rs:326 type EdgeRefs is no longer UnwindSafe, in /tmp/.tmpncG4Dv/portgraph/src/view/petgraph.rs:326 type EdgeRefs is no longer RefUnwindSafe, in /tmp/.tmpncG4Dv/portgraph/src/view/petgraph.rs:326 type NodeEdgeRefs is no longer Send, in /tmp/.tmpncG4Dv/portgraph/src/view/petgraph.rs:396 type NodeEdgeRefs is no longer Sync, in /tmp/.tmpncG4Dv/portgraph/src/view/petgraph.rs:396 type NodeEdgeRefs is no longer UnwindSafe, in /tmp/.tmpncG4Dv/portgraph/src/view/petgraph.rs:396 type NodeEdgeRefs is no longer RefUnwindSafe, in /tmp/.tmpncG4Dv/portgraph/src/view/petgraph.rs:396 --- failure inherent_method_missing: pub method removed or renamed --- Description: A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/inherent_method_missing.ron Failed in: FilteredGraph::new_region, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/region.rs:26 FilteredGraph::new_flat_region, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/region.rs:105 FilteredGraph::new_subgraph, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/subgraph.rs:73 FilteredGraph::is_convex, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/subgraph.rs:100 FilteredGraph::is_convex_with_checker, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/subgraph.rs:106 FilteredGraph::new_region, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/region.rs:26 FilteredGraph::new_flat_region, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/region.rs:105 FilteredGraph::new_subgraph, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/subgraph.rs:73 FilteredGraph::is_convex, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/subgraph.rs:100 FilteredGraph::is_convex_with_checker, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/subgraph.rs:106 --- failure module_missing: pub module removed or renamed --- Description: A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-public. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/module_missing.ron Failed in: mod portgraph::py_graph, previously in file /tmp/.tmpJ9kcgB/portgraph/src/py_graph.rs:1 mod portgraph::view::subgraph, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/subgraph.rs:1 mod portgraph::view::region, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/region.rs:1 --- failure struct_missing: pub struct removed or renamed --- Description: A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/struct_missing.ron Failed in: struct portgraph::view::region::RegionContext, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/region.rs:35 struct portgraph::view::filter::FilteredGraphCtx, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/filter.rs:131 struct portgraph::view::subgraph::SubgraphContext, previously in file /tmp/.tmpJ9kcgB/portgraph/src/view/subgraph.rs:53 --- failure trait_removed_associated_type: trait's associated type was removed --- Description: A public trait's associated type was removed or renamed. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/trait_removed_associated_type.ron Failed in: associated type LinkView::Neighbours, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:291 associated type LinkView::NodeConnections, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:296 associated type LinkView::NodeLinks, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:302 associated type LinkView::PortLinks, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:308 associated type LinkView::Neighbours, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:291 associated type LinkView::NodeConnections, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:296 associated type LinkView::NodeLinks, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:302 associated type LinkView::PortLinks, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:308 associated type MultiView::NodeSubports, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:589 associated type MultiView::NodeSubports, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:589 associated type PortView::Nodes, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:22 associated type PortView::Ports, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:27 associated type PortView::NodePorts, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:32 associated type PortView::NodePortOffsets, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:37 associated type PortView::Nodes, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:22 associated type PortView::Ports, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:27 associated type PortView::NodePorts, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:32 associated type PortView::NodePortOffsets, previously at /tmp/.tmpJ9kcgB/portgraph/src/view.rs:37 ``` <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.13.0](v0.12.3...v0.13.0) - 2025-01-17 ### New Features - [**breaking**] Use RPITIT for graph traits (#156) - [**breaking**] Boundary order checking (#164) ### Performance - [**breaking**] Fix Subgraph O(n) complexity (#157) - [**breaking**] Manual impl of `Region`/`FlatRegion` for improved perf (#162) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). --------- Co-authored-by: Agustín Borgna <121866228+aborgna-q@users.noreply.github.com>
Followup to #157. Avoids using
FilteredGraph
for the implementation ofRegion
andFlatRegion
and instead implements the graph traits manually to avoid doing full-graph traversals when we can do better/faster checks.Closes #159. Closes #145 (BFS rather than DFS). Closes #135.
BREAKING CHANGE:
Region
andFlatRegion
are no longer aliases of FilteredGraph