-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add streaming match generation #39
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
sorry for the quiet; doing a little benchmarking right now on the performance implications of calling a nested func vs unwrapping these!
[edit] (i.e. i totally agree that generators vs list comprehensions is a huge improvement if you abort early; but i'm less sure about if you still run to completion)
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.
Sounds good. I tried to make the change as minimally invasive as possible but I agree that having them as separate functions would be cleaner.
Let me know if you come across anything that seems slower. In the worst case scenario, it goes through all the data and discovers there are no matches (i.e. a full scan).
I also think the grand project is a pretty cool idea, putting a networkx interface on different backends such as a SQL database. I could see where indexes could make full scan operations much faster.
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.
@davidmezzetti I got about +10μs benchmarking locally with ASV, which I think is fair to say is in the noise :) nice work!
I'd LOVE to have better indexing in Grand; I've been aiming for feature-completeness first and then adding in "shortcuts" and optimizations; would love to chat about some gameplans if you're interested!
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.
Sounds good to me. I think having a networkx dialect applied towards something like a SQLite backend with indexes could be a powerful in-memory graph solution.
Things like an attribute search could return immediately regardless if there was/wasn't data for example (i.e. no full scans). In the case of SQLite, you'd get the native code and smart memory management for free. But still have the ease-of-use of networkx.
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.
COMPLETELY agree, would love to have a sqlite true high speed implementation!