You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have worked on this type of issue in one of my project, where earlier all nodes are running sequentially, I wanted to make them run in parallel, So basically I wrote an algorithm ( just a dfs 😂 ) , in this algo what I did was, first i created one map which indicates which node is connected to which node, then I created a list in which all sequences (all paths ) from source to desination are mentioned ( I did this using Graph concept , first created an adjacency list and used dfs to map all the paths), for example [ { 0->1->2->4}, {0->1->3->4}] , here 2 and 3 are conneceted with 1 , here my source is 0 and destination is 4.
After getting the list [ { 0->1->2->4}, {0->1->3->4}], I used promise.all to execute both the path in parallel, it made my program very fast and reduced the time of execution from 17 seconds to 4 seconds
fyi :- . 4 seconds seems slow but it takes this much time because it is calling a lot of functions in the backend( quite complex project 😉).
right now, execution of nodes happens in sequence.
example: in reactflow, need to find a way to run two nodes using the previous node has finished generation of output.
here is some guidance on custom nodes in reactflow:
https://reactflow.dev/learn/customization/custom-nodes
The text was updated successfully, but these errors were encountered: