Jira (PUP-11322) Excessive copying of already merged code for the main hostclass

20 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Oct 15, 2021, 1:30:03 PM10/15/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Puppet / Bug PUP-11322
Excessive copying of already merged code for the main hostclass
Change By: Josh Cooper
Summary: Excessive copying of already merged code for hostclasses the main hostclass
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Josh Cooper (Jira)

unread,
Oct 15, 2021, 1:37:02 PM10/15/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
When parsing manifests, we merge the main hostclass' code. Each merge creates a new BlockExpression containing the children from the old and new codes : https://github . com/puppetlabs/puppet/blob/e0ea9a23bc867d337abf6c9d274e46729b058f15/lib/puppet/resource/type.rb#L145

This means we're copying the children from the code that has already been merged code into {{self}} N times and the array gets bigger each time. This accounts for about 11MB when running the The many_modules benchmark with creates 100 iterations modules each with 11 manifests and it generates an extra 11MB of allocated memory .

It seems like we should be
* appending * the new code with the already merged code while preserving the flattening behavior .

Ciprian Badescu (Jira)

unread,
Oct 18, 2021, 10:11:03 AM10/18/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Oct 18, 2021, 9:04:03 PM10/18/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Oct 18, 2021, 9:05:02 PM10/18/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Dec 7, 2021, 5:21:02 PM12/7/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Epic Link: PUP-11073
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Josh Cooper (Jira)

unread,
Dec 7, 2021, 5:22:02 PM12/7/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11322
 
Re: Excessive copying of already merged code for the main hostclass

This didn't make 7.13.0 so I bumped it from the epic.

Josh Cooper (Jira)

unread,
Jan 12, 2022, 12:39:02 PM1/12/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jan 12, 2022, 12:40:02 PM1/12/22
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages