From 27aa21012d249bd39070115e6f640c0196bbdd81 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Tue, 10 Mar 2009 00:22:32 -0500 Subject: 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 --- lib/puppet/type/file.rb | 1 - lib/puppet/type/file/ensure.rb | 1 - 2 files changed, 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 -- cgit