Jira (PUP-11073) Reduce Memory Usage

1 view
Skip to first unread message

Josh Cooper (Jira)

unread,
May 28, 2021, 1:52:25 PM5/28/21
to puppe...@googlegroups.com
Josh Cooper created an issue
 
Puppet / Epic PUP-11073
Reduce Memory Usage
Issue Type: Epic Epic
Assignee: Unassigned
Created: 2021/05/26 1:14 PM
Priority: Normal Normal
Reporter: Josh Cooper

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

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages