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. Signed-off-by: Markus Roberts <[email protected]> --- lib/puppet/resource.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb index c4e52af..39803b0 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 -- 1.6.4 -- 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.
