diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-04-10 15:51:59 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-04-10 16:00:50 -0700 |
commit | 79c8782bbc9ca07898bda6ff9a3a7cdcc39bcdcf (patch) | |
tree | 37ac2d91a2e9d7de3ba33abab1afaf92bdcac8b8 /spec/integration | |
parent | 76fa86f06fc4b4ed2c4ba165c64b28538c6d637c (diff) | |
download | chef-79c8782bbc9ca07898bda6ff9a3a7cdcc39bcdcf.tar.gz |
fix Chef-14 chef_fs/chef-zero perf regressionlcg/chef-zero-perf
Fixes a perf bug introduced by #6471 where we were taking O(n^2)
with the number of cookbook versions in the cookbook synch phase.
This is a minimum viable fix that changes the algorithm so that
it does the old, fast method of looking up the CBV first. Only
if it doesn't find it does it then go searching for cookbooks
that are in a differently named directory but which match by
the name in the metadata.
There may be edge conditions here if people mix-and-match and
have cookbooks which have both named-directory and
name-in-metadata versions. Please try not to do that. Don't
cross the streams.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/integration')
-rw-r--r-- | spec/integration/knife/chef_fs_data_store_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/integration/knife/chef_fs_data_store_spec.rb b/spec/integration/knife/chef_fs_data_store_spec.rb index ff674082b7..d50968f327 100644 --- a/spec/integration/knife/chef_fs_data_store_spec.rb +++ b/spec/integration/knife/chef_fs_data_store_spec.rb @@ -1,6 +1,6 @@ # # Author:: John Keiser (<jkeiser@chef.io>) -# Copyright:: Copyright 2013-2016, Chef Software Inc. +# Copyright:: Copyright 2013-2018, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); |