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

add DP to incoming and outgoing #18

Open
wants to merge 2 commits into
base: add-dp-to-incoming-outgoing
Choose a base branch
from

Conversation

jobeland
Copy link
Collaborator

This change adds tracking for nodes already visited and nodes already matched when exploring the graph via outgoing/incoming constraints in aim to help reduce time and unnecessary calls to the store. At scale, this seemed to reduce calls to 1/3 (~300K to ~100K) and increased the memory footprint by ~200MB during calculation

PR is for a side branch for now and we can review later if we want to bring this into master

@jobeland jobeland requested a review from angshuman December 16, 2019 22:50
@jobeland jobeland self-assigned this Dec 16, 2019
var matched = source.Where(x =>
{
IEnumerable<string> targets;
IDictionary<string, ISet<string>> targets;
Copy link
Collaborator

@emgarten emgarten Dec 17, 2019

Choose a reason for hiding this comment

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

nit: it would be better for perf to use Dictionary<string, HashSet<string>> for anything that isn't exposed externally

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Got sidetracked. Thanks for the feedback, updated in b0701ad

@emgarten
Copy link
Collaborator

This looks like a great improvement 💯

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.

2 participants