Skip to content

Commit

Permalink
fixup-PR#506 Speed improvements in facter resolution
Browse files Browse the repository at this point in the history
This is to improve speed on Facter resolution of service_provider fact
that was just introduced in PR# 506.  The improvements go from 280ms
resolution time approx. down to 2ms resolution time approx. by adding
requires statements.
  • Loading branch information
asasfu committed Sep 26, 2015
1 parent 4d1bca3 commit 440245d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/facter/service_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
#
# Caveats:
#
require 'puppet/type'
require 'puppet/type/service'

Facter.add(:service_provider) do
setcode do
Puppet::Type.type(:service).newservice(:name => 'dummy')[:provider].to_s
Expand Down

0 comments on commit 440245d

Please sign in to comment.