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

skgraph.tools.find_surface_nodes is very slow #2577

Open
ma-sadeghi opened this issue Sep 26, 2022 · 3 comments
Open

skgraph.tools.find_surface_nodes is very slow #2577

ma-sadeghi opened this issue Sep 26, 2022 · 3 comments

Comments

@ma-sadeghi
Copy link
Member

...so slow, that for large-enough networks (>100k nodes), it becomes the bottle-neck for CubicTemplate.

@jgostick
Copy link
Member

oh? I thought the bottleneck was in the trim function?

@ma-sadeghi
Copy link
Member Author

I just profiled CubicTemplate and find_surface_nodes seems to be taking up almost ~95% of the total run time for large networks.

@ma-sadeghi
Copy link
Member Author

Here's some concrete timings for reference:

32x32x32

  • Total time: 2.5 s
  • skgraph.tools.find_surface_nodes: 2.45
  • skgraph.generators.cubic_template: 0.05

64x32x32

  • Total time: 7.5 s
  • skgraph.tools.find_surface_nodes: 7.4
  • skgraph.generators.cubic_template: 0.1

As you can see, it gets worse as you go to larger networks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants