theforeman/foreman — pull request #615 by eLobato (2013-05-15 09:59:09+00:00)
Title: FactNames are not precreated

facts.keys.dup.delete_if { |n| fact_names.map(&:name).include? n } creates a tremendous overhead on the facts import from the puppet masters, this fix simply takes the code from the original Puppet::Rails::Host. As an example, imports have gone from ~30s to ~200ms