We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 562c6cf + 427933d commit 04d6cccCopy full SHA for 04d6ccc
server/lib/puppet-languageserver/puppet_helper.rb
@@ -119,11 +119,15 @@ def self.prune_resource_parameters(resources)
119
120
def self._load_types
121
@types_hash = {}
122
- Puppet::Type.loadall
+ # This is an expensive call
123
+ # From https://github.com/puppetlabs/puppet/blob/ebd96213cab43bb2a8071b7ac0206c3ed0be8e58/lib/puppet/metatype/manager.rb#L182-L189
124
+ typeloader = Puppet::Util::Autoload.new(self, "puppet/type")
125
+ typeloader.loadall
126
127
Puppet::Type.eachtype do |type|
128
next if type.name == :component
129
next if type.name == :whit
130
+
131
@types_hash[type.name] = type
132
end
133
0 commit comments