setzer22 / egui_node_graph

Build your node graph applications in Rust, using egui
MIT License
715 stars 134 forks source link

change non recurring DFS #52

Closed kkngsm closed 1 year ago

kkngsm commented 2 years ago

I changed the implementation to non-recurring DFS. This will do the following well.

  1. This implementation does not use recursion, so it does not cause a stack overflow even if the number of nodes is large.
  2. 21

inf

kkngsm commented 2 years ago

One problem with this approach is that if more than one input receives a single output, it will be stored in a duplicate calculation order list. I'm currently working on a solution to this problem, but have not been able to improve it.

setzer22 commented 2 years ago

Hi! Many thanks for the PR :) Currently a bit busy but I'll have a look and get back to you soon :+1:

kkngsm commented 1 year ago

Close because this PR has little merit and is getting old. 

setzer22 commented 1 year ago

I'm sorry you feel that way! I already had a quick look at the changes and I like the overall direction, but to be honest I haven't yet had time to take a proper look at it due to several irl things that have got me quite busy for the past few months.

I've been merging other PRs since, but the scope of this is a bit larger so I wanted to take proper time to review it. My overall feeling was that this change is useful to other users and I was inclined to merge it :+1:

kkngsm commented 1 year ago

Sorry, I didn't word it right. I realized that the infinite loop countermeasure can be done by just adding a little bit of writing to the current state using a recursive function. On top of that, I have decided to build another minimal PR because there is little advantage to a NON RECURRING DFS. I thank @setzer22 for building a great library and of course you can prioritize your day job😊👍.