Skip to content

Conversation

@dafyddcrosby
Copy link
Contributor

Check the cookbook_obj_cache before calling get_data in depsolve to avoid redundant fetches during backtracking. Also preserve the cache across failed recursive branches by not destructuring [nil, nil] returns into cookbook_obj_cache.

This ~halves the time my client takes to do depsolving when using Chef Zero

Description

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

…lve before calling get_data

Check the cookbook_obj_cache before calling get_data in depsolve to avoid redundant fetches during backtracking. Also preserve the cache across failed recursive branches by not destructuring [nil, nil] returns into cookbook_obj_cache.

Signed-off-by: David Crosby <dcrosby@fb.com>
@sonarqubecloud
Copy link

@dafyddcrosby dafyddcrosby marked this pull request as ready for review February 10, 2026 23:08
@dafyddcrosby dafyddcrosby requested review from a team and jaymzh as code owners February 10, 2026 23:08
@tpowell-progress tpowell-progress merged commit 9321ed6 into chef:main Feb 11, 2026
38 checks passed
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.

3 participants