Skip to content

Improve time complexity of identity node removal - #4625

Open
0HyperCube wants to merge 4 commits into
GraphiteEditor:masterfrom
0HyperCube:faster-identity-removal
Open

0HyperCube wants to merge 4 commits into
GraphiteEditor:masterfrom
0HyperCube:faster-identity-removal

Conversation

@0HyperCube

Copy link
Copy Markdown
Contributor

Working towards #4572.

  • Reduce time complexity of remove_passthrough_node from O(n) to O(1) by using the cached list of dependants.
  • Remove some unused fields and methods from OriginalLocation
  • Add a test to ensure the remove_passthrough_node function works properly.
  • Validate that the cached list of dependants is accurate (and fix some instances where it contained deleted node ids).

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed against the latest diff

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread node-graph/graph-craft/src/document.rs
Comment thread node-graph/graph-craft/src/document.rs Outdated
Comment thread node-graph/graph-craft/src/document.rs
Comment thread node-graph/graph-craft/src/document.rs Outdated
Comment thread node-graph/graph-craft/src/document.rs Outdated
Comment thread node-graph/graph-craft/src/document.rs
@0HyperCube
0HyperCube force-pushed the faster-identity-removal branch from c55551f to 09109a0 Compare September 30, 2026 11:25

This branch has not been deployed

No deployments
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.

2 participants