Skip to content

Conversation

@liamcervante
Copy link
Member

This PR updates the stack plan, stack state, and removed tracking structures to store components within a nested tree structure instead of a single flat map entry.

This means we can now retrieve components by embedded stack address efficiently instead of having to iterate over the entire collection of components every time. Lookups to individual components now have to traverse the tree, but the address is still precise giving a direct map look up at every stage of the address which is still acceptable.

The removed tracking changes are similar, where instead of four flat maps of various removed blocks, the embedded blocks are now stored in a nested removed structure. This means we write the removed structure once when everything is discovered the first time, and then it can be reused in later iterations. This also tidies up the next piece of work (orphaned removed blocks) by making it easier to retrieve removed blocks by direct addresses.

@liamcervante liamcervante added the no-changelog-needed Add this to your PR if the change does not require a changelog entry label Apr 4, 2025
@liamcervante liamcervante requested a review from a team as a code owner April 4, 2025 15:50
@liamcervante liamcervante merged commit 063757f into main Apr 16, 2025
10 checks passed
@liamcervante liamcervante deleted the liamcervante/stacks/efficiency branch April 16, 2025 12:05
@github-actions
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog-needed Add this to your PR if the change does not require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants