Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2219.
Since 7a1acb6 there was a workaround in place to ensure that the cache of logic trees gets cleared very frequently because the depsgraph updates don't reflect all updates to logic trees. But because the
always()
callback only runs twice a second, it could happen that changes made to a tree weren't reflected in the build if the user starts the build before thealways()
callback was run. Now that we have dedicated tree update callbacks for live patching, we can use them to clear the cache on each change made to the node tree and get rid of the old workaround.Note that the current approach is still a bit over-conservative (less than before though), for example the cache is also cleared when you start dragging a connection from a socket but cancel the operation before reaching the target socket. So there is still some potential for improvement in the future.