Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-11073

Reduce memory usage

    XMLWordPrintable

Details

    • Epic
    • Status: Closed
    • Normal
    • Resolution: Done
    • None
    • PUP 7.13.0
    • None
    • None
    • Needs Assessment

    Description

      Puppet was written before frozen string literals were added in Ruby 2.3, so by default puppet creates many transient string objects during compilation, which must be garbage collected. We can't simply switch all source files over to using frozen_string_literal: true because we sometimes create a string in one module/class/file, and the string is mutated somewhere unrelated. So we have to be selective about adding the pragma or calling String#freeze.
       
      The following are prime candidates:
       

      lib/puppet/concurrent/thread_local_singleton.rb
      lib/puppet/parser/scope.rb
      lib/puppet/parser/templatewrapper.rb
      lib/puppet/pops/model/factory.rb
      lib/puppet/pops/model/ast.rb
      lib/puppet/pops/parser/lexer2.rb
      lib/puppet/pops/parser/slurp_support.rb
      lib/puppet/pops/types/type_formatter.rb
      lib/puppet/resource/type_collection.rb
      lib/puppet/util/tagging.rb
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              josh Josh Cooper
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support