Skip to content
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

Py speedup1 #1840

Merged
merged 33 commits into from
Nov 5, 2024
Merged

Py speedup1 #1840

merged 33 commits into from
Nov 5, 2024

Conversation

fabianmurariu
Copy link
Collaborator

What changes were proposed in this pull request?

Add numpy to python properties when we can

Why are the changes needed?

because rust -> python is sometimes slow

Does this PR introduce any user-facing change? If yes is this documented?

How was this patch tested?

Issues

closes #1839

Are there any further changes required?

Copy link
Contributor

@github-actions github-actions bot left a comment

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: 5236f2a Previous: 85a9eab Ratio
lotr_graph_subgraph_10pc/has_node_nonexisting 6 ns/iter (± 0) 2 ns/iter (± 0) 3

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

Copy link
Collaborator

@ljeub-pometry ljeub-pometry left a comment

Choose a reason for hiding this comment

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

  • Need to fix the performance regressions due to cloning the layer ids.

  • A lot more things need to return iterators and numpy arrays but we can keep working on that in future PRs

python/tests/test_graphdb/test_graphdb.py Outdated Show resolved Hide resolved
raphtory/src/db/api/properties/constant_props.rs Outdated Show resolved Hide resolved
raphtory/src/db/api/properties/constant_props.rs Outdated Show resolved Hide resolved
raphtory/src/db/api/properties/internal.rs Outdated Show resolved Hide resolved
fn temporal_history_date_time(&self, id: usize) -> Option<Vec<DateTime<Utc>>> {
self.temporal_history(id)
.iter()
.map(|t| t.dt())
.collect::<Option<Vec<_>>>()
}
fn temporal_values(&self, id: usize) -> Vec<Prop>;

fn temporal_values_iter(&self, id: usize) -> Box<dyn Iterator<Item = Prop> + '_> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is stopping us from making temporal_values return iterators?

raphtory/src/db/api/view/internal/edge_filter_ops.rs Outdated Show resolved Hide resolved
raphtory/src/db/api/view/internal/node_filter_ops.rs Outdated Show resolved Hide resolved
raphtory/src/db/graph/node.rs Show resolved Hide resolved
raphtory/src/python/graph/edge.rs Outdated Show resolved Hide resolved
raphtory/src/python/graph/properties/temporal_props.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@ljeub-pometry ljeub-pometry left a comment

Choose a reason for hiding this comment

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

Looks good to merge

@fabianmurariu fabianmurariu merged commit b093f48 into master Nov 5, 2024
19 checks passed
@fabianmurariu fabianmurariu deleted the py_speedup1 branch November 5, 2024 13:09
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.

Small python improvements
2 participants