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

Network edge count/iter performance testing #35

Open
etatara opened this issue Jan 10, 2023 · 0 comments
Open

Network edge count/iter performance testing #35

etatara opened this issue Jan 10, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@etatara
Copy link
Member

etatara commented Jan 10, 2023

The networkx graph API for getting the in and out edges appear to be costly, e.g.:

in_count = len(self.network.graph.in_edges(person))
out_count = len(self.network.graph.in_edges(person))

are pretty slow for large networks (30,000 nodes and 15,000 edges). We should investigate if there are
more efficient API calls in networkx that provide edge counts, and edge views in general, as in iterating over
agent network edges like

donor_list = [x for x,_ in self.network.graph.in_edges(self)]

Furthermore, we might want to provide repast4py network API for these functions so the user doesn't need to reference the underlying networkx graph.

@etatara etatara added the enhancement New feature or request label Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants