diff options
| author | Luke Kanies <luke@madstop.com> | 2008-03-21 00:39:26 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-03-21 00:39:26 -0500 |
| commit | 18320b8e3271f7d1d1702907be1ff420acfc8d2b (patch) | |
| tree | 159cde5158579fc3b0ae6e502c25b32752d7561c /lib/puppet/network/client | |
| parent | f6325dceb3b10c300f421f540281bbd64bdc091e (diff) | |
Found all instances of methods where split() is used without
any local variables and added a local variable -- see
http://snurl.com/21zf8. My own testing showed that this
caused memory growth to level off at a reasonable level.
Note that the link above says the problem is only with class
methods, but my own testing showed that it's any method that
meets these criteria. This is not a functional change, but
should hopefully be the last nail in the coffin of #1131.
Diffstat (limited to 'lib/puppet/network/client')
| -rw-r--r-- | lib/puppet/network/client/master.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/puppet/network/client/master.rb b/lib/puppet/network/client/master.rb index e914d5c69..955acbfb5 100644 --- a/lib/puppet/network/client/master.rb +++ b/lib/puppet/network/client/master.rb @@ -50,7 +50,8 @@ class Puppet::Network::Client::Master < Puppet::Network::Client # Return the list of dynamic facts as an array of symbols def self.dynamic_facts - Puppet.settings[:dynamicfacts].split(/\s*,\s*/).collect { |fact| fact.downcase } + # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com] + x = Puppet.settings[:dynamicfacts].split(/\s*,\s*/).collect { |fact| fact.downcase } end # Cache the config @@ -425,7 +426,8 @@ class Puppet::Network::Client::Master < Puppet::Network::Client end def self.loadfacts - Puppet[:factpath].split(":").each do |dir| + # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com] + x = Puppet[:factpath].split(":").each do |dir| loaddir(dir, "fact") end end |
