Prevent duplicate node updates - #82
Open
chess123mate wants to merge 3 commits into
Open
Conversation
chess123mate
marked this pull request as draft
August 1, 2026 04:45
Author
|
Switched to draft: just found a bug (revealed if one of the effects errors); still working on a solution. |
chess123mate
force-pushed
the
fix-duplicate-updates
branch
3 times, most recently
from
August 3, 2026 19:43
1e4f630 to
167330b
Compare
chess123mate
force-pushed
the
fix-duplicate-updates
branch
from
August 3, 2026 19:44
167330b to
ff020ba
Compare
Author
|
Fixed the bug and added a test. Note: if a node adds a dependency after the initial update, redundant updates are still possible (this only happens once per newly added dependency). |
chess123mate
marked this pull request as ready for review
August 3, 2026 19:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 graph.luau to only run node updates once all its dependencies are evaluated. Notably, it no longer
unparents nodes when queuing them, but waits tounparentuntil just before updating the node (required so that the dependency tree remains intact longer).Note: I didn't run benchmark tests. I don't expect the changes to be costly, but there is a bit of extra work being done in all cases.