-
Notifications
You must be signed in to change notification settings - Fork 233
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
Sverchok Node Tree Updates needlessly #4576
Comments
Could you upload a file with such problem? |
I was recording a video and noticed the exact behaviour: If you connect a second output to the same output socket, then all nodes that were previously connected to that output socket get updated. This can cause a cascade of un-necessary updates. To test:
|
Now it's clear and ,actually, it's intendent behavior for now, but of cause it should be improved in future. The problem is that many nodes uses next optimization: def process(self):
if not self.any_ouputs_linked:
return
...
if self.outputs[0].is_linked:
self.outputs[0].sv_set(data)
if self.outputs[1].is_linked:
self.outputs[1].sv_set(data) It means that update system should process the node not only when input data was changed bat also when output connection was changed. It of cause leads to redundant calculations. We can either:
|
Thank you. From a user perspective, the cost can be really high if the existing chain of nodes is long and/or time-consuming to compute. |
By the way, even dragging and dropping a new node seems to trigger updates. It has slowed down the workflow considerably. I would appreciate an urgent look at this if it can be remedied. I currently have a node that has 1200 wires in it and if I simply connect another node to it, I have to wait a few minutes for it to re-update. Thank you! |
I thought to wait with the fix for next Sverchok version because it requires a lot of small changes and can bring some instability. But probably what I can do now is to add some temporary node attribute which would mark a node for update system that it should not be updated when its output sockets are connected. In this case you have to add the attribute to all nodes which should not be updated. |
I think I would wait for next release because I don’t control the code for all nodes. So if my workflow depends on an OOTB node and that node is connected to a time consuming Topologic node, I would still face the same problem because the input socket data ‘changed’. Thank you for looking at this and solving it. Also please look at why dragging and dropping a new disconnected node sometimes triggers an update and the GUI freezes until the update is done. In that case no sockets are connected to trigger an update. Weird. |
I see what you mean. In an example below the nodes will be called each time when new node is added to the tree. This because Get Objects Data uses scene update handler. Unfortunately the handler does not produce information about what exactly was change in a scene and it's difficult to filter out specific events. I'll have a look what can be done. |
You've reported two problems here, I fixed one of them believe. Another problem should be fixed within #4322 |
Apologies for the confusion. Can you please explain what the two problems are and which one is fixed? Thank you. |
All described above behavior, as I said, is expected for now.
I mean this.
|
ok thank you. My current workaround for now is when I create a node, I immediately mute it (by pressing M on it), connect all the nodes that need to emanate from it, then unmute it to see the result without having to create multiple copies of the output. |
I'm sorry you have to do all this and I hope that Sverchok will get improvement in this area once. |
Problem statement
With the latest version of sverchok, it seems anytime I connect a new node, existing nodes that are on a separate unrelated branch get updated which slows down all execution.
For any other issues, or if the installation still failed; Please describe the problem here.
Steps to reproduce
Expected result
Only the affected/downstream nodes to be updated
Actual result
Unrelated nodes get updated.
Sverchok version
Latest from downloading from the Green Code button as a ZIP file
The text was updated successfully, but these errors were encountered: