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 <[email protected]> --- lib/puppet/type/file.rb | 1 - 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 d96b5dd..3be96ff 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 5c4d98d..4ec35ce 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 -- 1.6.1 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
