Skip to content

Commit

Permalink
Fixed slow edge layer lookup (#1487)
Browse files Browse the repository at this point in the history
* Fixed slow edge layer lookup

* fmt
  • Loading branch information
miratepuffin authored Feb 15, 2024
1 parent 2fcf50f commit 233a13f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ keywords = ["graph", "temporal-graph", "temporal"]
authors = ["Pometry"]
rust-version = "1.67.1"
edition = "2021"

[profile.release-with-debug]
inherits = "release"
debug = true
7 changes: 3 additions & 4 deletions raphtory/src/db/graph/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,10 @@ impl<G: StaticGraphViewOps + InternalPropertyAdditionOps + InternalAdditionOps>
layer: Option<&str>,
) -> Result<(), GraphError> {
let input_layer_id = self.resolve_layer(layer, false)?;
if self
if !self
.graph
.edge_layers(self.edge, LayerIds::One(input_layer_id))
.next()
.is_none()
.core_edge(self.edge.pid())
.has_layer(&LayerIds::One(input_layer_id))
{
return Err(GraphError::InvalidEdgeLayer {
layer: layer.unwrap_or("_default").to_string(),
Expand Down

0 comments on commit 233a13f

Please sign in to comment.