Jira (PUP-11314) Requiring files inside settings hook is slow on Windows

16 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Oct 5, 2021, 12:25:03 PM10/5/21
to puppe...@googlegroups.com
Josh Cooper created an issue
 
Puppet / Bug PUP-11314
Requiring files inside settings hook is slow on Windows
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2021/10/05 9:23 AM
Priority: Normal Normal
Reporter: Josh Cooper

Calling require/require_relative inside of the storeconfigs setting hook is really slow on Windows: https://github.com/puppetlabs/puppet/blob/75737603872883d8d72224e2a6857804938f9634/lib/puppet/defaults.rb#L2122-L2123

It appears to add several minutes to the overall rspec time on Windows.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Josh Cooper (Jira)

unread,
Oct 5, 2021, 4:56:03 PM10/5/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11314
 
Re: Requiring files inside settings hook is slow on Windows

The issue is on_initialize_and_write hooks are called at the start of every test, so we're calling require/require_relative about ~40k times.

Also the factpath setting has a similar hook and we keep appending the same 2 directories to the facter search path.

Josh Cooper (Jira)

unread,
Oct 5, 2021, 11:38:03 PM10/5/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Oct 5, 2021, 11:39:03 PM10/5/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Oct 5, 2021, 11:39:03 PM10/5/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Coremunity Kanban

Josh Cooper (Jira)

unread,
Oct 6, 2021, 12:20:02 AM10/6/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 6.26.0
Fix Version/s: PUP 7.13.0

Josh Cooper (Jira)

unread,
Oct 6, 2021, 12:20:03 AM10/6/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Not Needed

Gabriel Nagy (Jira)

unread,
Oct 7, 2021, 5:02:01 AM10/7/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages