From e783a16fbc2c856c212094b4a787a08c16536a0d Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Fri, 13 Aug 2010 13:32:33 -0700 Subject: Fix for #4506 -- too much data being serialized The serialization of much of the memory image was being triggered by a copy of an unchanging method return value in an instance variable. I had introduced this as a performance hack. The results were correct, but when the object was serialized it took a huge amount of data with it (known_resource_types, and from there...) As the underlying costly operation is no longer being called (thanks to Paul and Jesse) the caching is no longer a significant performance boost, and can thus simply be removed. --- lib/puppet/resource.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb index c4e52af18..39803b077 100644 --- a/lib/puppet/resource.rb +++ b/lib/puppet/resource.rb @@ -193,7 +193,7 @@ class Puppet::Resource end def resource_type - @resource_type ||= case type + case type when "Class"; known_resource_types.hostclass(title == :main ? "" : title) when "Node"; known_resource_types.node(title) else -- cgit