Skip to content

Conversation

@shiruosong
Copy link

The loop in get_sub_nodes caused exponential growth of current_generation, when children lists contained duplicate node IDs, leading to:

  1. Iter 1: 1 node → 100 children
  2. Iter 2: 100 nodes → 100 identical children (each repeated)
  3. Subsequent iterations grew with exponentially increasing duplicate entries

Fixed by:

  • Adding deduplication via list(set(next_generation))

…aversal

The loop in get_sub_nodes caused exponential growth of current_generation, when children lists contained duplicate node IDs, leading to:

1. Iter 1: 1 node → 100 children
2. Iter 2: 100 nodes → 100 identical children (each repeated)
3. Subsequent iterations grew with exponentially increasing duplicate entries

Fixed by:
- Adding deduplication via list(set(next_generation))
@zjgemi
Copy link
Collaborator

zjgemi commented Jun 4, 2025

That's right. Thanks for your suggestion.

@zjgemi zjgemi merged commit c599e0b into deepmodeling:master Jun 4, 2025
2 checks passed
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