Skip to content

Conversation

@ChefAustin
Copy link
Contributor

This PR will do one thing: Replace all instances of #Hash.reject { |_k, v | v.nil? } with #Hash.compact.

This has been shown (chef/chef#10601) to increase speed by a reasonable amount and is a bit more simple (IMHO).

Tested this locally with Chef Solo and -- with a sample size of 4x runs -- our run_list went from an average run time of 30s (using .reject) to 24s (using .compact).

@ChefAustin
Copy link
Contributor Author

I went ahead and fixed all the CI errors (or disabled Rubocop wherever I deemed that to be best course of action).

Let me know if y'all find any of my lint changes... offensive. 😎

@ChefAustin
Copy link
Contributor Author

Bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants