diff options
author | Luke Kanies <luke@madstop.com> | 2009-03-10 00:22:32 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-03-10 00:22:32 -0500 |
commit | 27aa21012d249bd39070115e6f640c0196bbdd81 (patch) | |
tree | e29e57e81de7d0f9ebae6c58012b5bcdf8d06c03 | |
parent | 5329b8a7a8869ca1a73188c48d411ed4c35ff291 (diff) | |
download | puppet-27aa21012d249bd39070115e6f640c0196bbdd81.tar.gz puppet-27aa21012d249bd39070115e6f640c0196bbdd81.tar.xz puppet-27aa21012d249bd39070115e6f640c0196bbdd81.zip |
Removing unnecessary calls to expire()
These calls were resulting in 1-2 extra round
trips per file. For simple comparison,
200 empty files took 73s before this change
and 20s after.
Signed-off-by: Luke Kanies <luke@madstop.com>
-rw-r--r-- | lib/puppet/type/file.rb | 1 | ||||
-rwxr-xr-x | lib/puppet/type/file/ensure.rb | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb index d96b5dd91..3be96ff2d 100644 --- a/lib/puppet/type/file.rb +++ b/lib/puppet/type/file.rb @@ -657,7 +657,6 @@ module Puppet # Remove any existing data. This is only used when dealing with # links or directories. def remove_existing(should) - expire() return unless s = stat self.fail "Could not back up; will not replace" unless handlebackup diff --git a/lib/puppet/type/file/ensure.rb b/lib/puppet/type/file/ensure.rb index 5c4d98d4b..4ec35ceb0 100755 --- a/lib/puppet/type/file/ensure.rb +++ b/lib/puppet/type/file/ensure.rb @@ -171,7 +171,6 @@ module Puppet end def sync - expire @resource.remove_existing(self.should) if self.should == :absent return :file_removed |