[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 2.6.1rc3-129-g74f8285

James Turnbull james at lovedthanlost.net
Tue Sep 7 13:30:26 UTC 2010


The following commit has been merged in the upstream branch:
commit e783a16fbc2c856c212094b4a787a08c16536a0d
Author: Markus Roberts <Markus at reality.com>
Date:   Fri Aug 13 13:32:33 2010 -0700

    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.

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

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list