Browse files

CHEF-607: Slightly faster ;P

  • Loading branch information...
1 parent 2be8a51 commit 8ed1a0982857786035f3e0b9f49aca2a08e22ee0 @fujin committed Nov 28, 2009
Showing with 1 addition and 2 deletions.
  1. +1 −2 chef/lib/chef/mixin/language_include_attribute.rb
View
3 chef/lib/chef/mixin/language_include_attribute.rb
@@ -38,8 +38,7 @@ def include_attribute(*args)
Chef::Log.debug("Loading Attribute #{attrib}")
node.run_state[:seen_attributes][attrib] = true
- @cookbook_loader = Chef::CookbookLoader.new
- @cookbook_loader.load_cookbooks
+ @cookbook_loader ||= (cl = CookbookLoader.new; cl.load_cookbooks; cl)
if amatch = attrib.match(/(.+?)::(.+)/)
cookbook = @cookbook_loader[amatch[1].to_sym]

0 comments on commit 8ed1a09

Please sign in to comment.