Skip to content

PyGraph add load batch-size and vacuum - #2818

Merged
fabianmurariu merged 30 commits into
db_v4from
pygraph_dfload_and_vacuum
Oct 9, 2026
Merged

fabianmurariu merged 30 commits into
db_v4from
pygraph_dfload_and_vacuum

Conversation

@fabianmurariu

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread raphtory/src/python/graph/graph.rs
Comment thread raphtory/src/python/graph/graph.rs
Comment thread raphtory/src/python/graph/graph.rs

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 65a82ae Previous: 9823ef7 Ratio
lotr_graph/num_edges 6 ns/iter (± 0) 0 ns/iter (± 0) +∞
lotr_graph/num_nodes 6 ns/iter (± 0) 1 ns/iter (± 0) 6
lotr_graph/graph_latest 3 ns/iter (± 0) 0 ns/iter (± 0) +∞
lotr_graph_materialise/materialize 8095767 ns/iter (± 60630) 1564816 ns/iter (± 35303) 5.17
lotr_graph_window_100/num_nodes 17 ns/iter (± 0) 5 ns/iter (± 0) 3.40
lotr_graph_window_100_materialise/materialize 7985311 ns/iter (± 156597) 1669150 ns/iter (± 10700) 4.78
lotr_graph_window_10/has_node_existing 137 ns/iter (± 9) 62 ns/iter (± 11) 2.21
lotr_graph_window_10_materialise/materialize 3458747 ns/iter (± 17680) 971980 ns/iter (± 4278) 3.56
lotr_graph_subgraph_10pc/has_node_nonexisting 5 ns/iter (± 0) 2 ns/iter (± 0) 2.50
lotr_graph_subgraph_10pc_materialise/materialize 2342734 ns/iter (± 10351) 334634 ns/iter (± 1287) 7.00
lotr_graph_subgraph_10pc_windowed/has_node_existing 143 ns/iter (± 8) 62 ns/iter (± 14) 2.31
lotr_graph_subgraph_10pc_windowed_materialise/materialize 1551908 ns/iter (± 10490) 230399 ns/iter (± 2617) 6.74
lotr_graph_window_50_layered/num_edges_temporal 146200 ns/iter (± 6889) 70121 ns/iter (± 7586) 2.08
lotr_graph_window_50_layered/has_node_existing 398 ns/iter (± 31) 129 ns/iter (± 12) 3.09
lotr_graph_window_50_layered/graph_latest 87254 ns/iter (± 2284) 36649 ns/iter (± 916) 2.38
lotr_graph_window_50_layered_materialise/materialize 30641273 ns/iter (± 665674) 3488825 ns/iter (± 24948) 8.78
lotr_graph_persistent_window_50_layered/num_edges_temporal 589273 ns/iter (± 4667) 192686 ns/iter (± 1569) 3.06
lotr_graph_persistent_window_50_layered/has_node_existing 414 ns/iter (± 350) 174 ns/iter (± 83) 2.38
lotr_graph_persistent_window_50_layered/graph_latest 125700 ns/iter (± 3888) 57549 ns/iter (± 4809) 2.18
lotr_graph_persistent_window_50_layered_materialise/materialize 52412357 ns/iter (± 399080) 5298035 ns/iter (± 147912) 9.89

This comment was automatically generated by workflow using github-action-benchmark.

fabianmurariu and others added 8 commits September 30, 2026 15:50
assert_graph_equal* now erase both graphs to DynGraphArc before running the
comparison, and the raphtory-tests filter helpers erase the graph and the
filter (Arc<dyn DynCreateFilter>), so the filtered view stack is compiled once
instead of once per concrete graph/filter type at every call site.

build-fast `cargo test --workspace --no-run`: 432s -> 296s
(test_filters 220s -> 77s, test_graphs 149s -> 77s, test_views 120s -> 28s).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@fabianmurariu
fabianmurariu disabled auto-merge October 1, 2026 16:08
Comment thread .github/actions/setup_rust/action.yml Outdated
with:
toolchain: ${{ steps.rust-version.outputs.version }}
components: cargo,clippy,rust-docs,rust-src,rust-std,rustc,rustfmt
# Pin every cargo/rustc call in the job to the Cargo.toml version, while leaving other

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did anything actually run with the wrong toolchain after using the setup_rust action?

Comment thread .github/workflows/bench-graphql.yml Outdated
Comment thread .github/workflows/benchmark.yml Outdated
Comment thread .github/workflows/code_coverage.yml Outdated
- name: Run Python tests
run: |
cd python && tox run
- name: Run Python extension tests

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we run this as a separate workflow and build it with build-fast?

Comment thread raphtory/src/db/api/state/ops/filter.rs Outdated
Comment thread raphtory/src/db/api/state/ops/node.rs Outdated
Comment thread raphtory/src/db/api/state/lazy_node_state.rs Outdated
Comment thread raphtory/src/db/api/state/node_state.rs
Comment thread raphtory-vectors/src/template.rs Outdated

@ljeub-pometry ljeub-pometry left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some quick things to tidy up and this is good to merge

@@ -58,7 +58,7 @@ jobs:
uses: actions/setup-python@v7

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we are getting rid of this given that we aren't running it?

RUSTFLAGS: -Awarnings
run: |
cargo hack check --workspace --all-targets --each-feature
cargo hack check --workspace --exclude raphtory_netflow --all-targets --each-feature

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could at least check that the example keeps compiling? That shouldn't be that expensive.

Comment thread .github/workflows/test_ui.yml Outdated
name: Cargo cache
with:
# Jobs building the same profile/features/RUSTFLAGS share one cache per OS
shared-key: python-release-minimal

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong key given this doesn't build with release anymore?

/// Example:
/// >>> vg = g.vectorise(cache, nodes="{{ name }} is a {{ node_type }}", edges="{{ src.name }} -> {{ dst.name }}: {{ properties.description }}")
#[pyo3(signature = (model, nodes = TemplateConfig::Bool(true), edges = TemplateConfig::Bool(true), verbose = false))]
fn vectorise(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should only exist if the vectors feature is enabled (as they are optional in python)

@fabianmurariu
fabianmurariu merged commit c468500 into db_v4 Oct 9, 2026
23 checks passed
@fabianmurariu
fabianmurariu deleted the pygraph_dfload_and_vacuum branch October 9, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants