Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize, then disable ResourceGraph during normal plans #35066

Merged
merged 2 commits into from Apr 24, 2024

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Apr 23, 2024

The main goal here is to temporarily disable the ResourceGraph creation during normal plans, to avoid the overhead when deferrals are not being used. The *deferring.Deferred value is referenced in many places now throughout core, so we make sure to replace it with a valid empty value.

While we're in here, the reducePreservingRelationships gets an optimization that was ready anyway. The algorithm to remove nodes can be done in a single pass when removing the nodes immediately. As each node is removed and replaced with the product of all edges, those edges will already be in place for the next steps if those new edges connect to more nodes which will be removed.

The reducePreservingRelationships method is strictly removing nodes and
passing through the connecting edges. This does not take multiple
rounds if the removal is done immediately, so we can make the process
much simpler.
When deferrals are not being used, don't spend time building the
deferrals graph.
@jbardin jbardin added the 1.8-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Apr 23, 2024
@jbardin jbardin requested review from apparentlymart and a team April 23, 2024 20:05
@liamcervante
Copy link
Member

I'll merge this now, so we can do the release today!

@liamcervante liamcervante merged commit f0843ca into main Apr 24, 2024
6 checks passed
Copy link

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.8-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants