Skip to content

Prevent duplicate node updates - #82

Open
chess123mate wants to merge 3 commits into
centau:mainfrom
chess123mate:fix-duplicate-updates
Open

Prevent duplicate node updates#82
chess123mate wants to merge 3 commits into
centau:mainfrom
chess123mate:fix-duplicate-updates

Conversation

@chess123mate

Copy link
Copy Markdown

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 to unparent until 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.

@chess123mate
chess123mate marked this pull request as draft August 1, 2026 04:45
@chess123mate

Copy link
Copy Markdown
Author

Switched to draft: just found a bug (revealed if one of the effects errors); still working on a solution.

@chess123mate
chess123mate force-pushed the fix-duplicate-updates branch 3 times, most recently from 1e4f630 to 167330b Compare August 3, 2026 19:43
@chess123mate
chess123mate force-pushed the fix-duplicate-updates branch from 167330b to ff020ba Compare August 3, 2026 19:44
@chess123mate

Copy link
Copy Markdown
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
chess123mate marked this pull request as ready for review August 3, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant