Project

General

Profile

Bug #2498

Reports yaml import is very slow

Added by Daniel Lobato Garcia about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
High
Category:
Importers
Target version:
Difficulty:
easy
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

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

https://github.com/theforeman/foreman/pull/615


Related issues

Related to Foreman - Bug #2509: fact names are duplicated in the databaseClosed2013-05-20
Related to Foreman - Bug #2507: fact importer failsClosed2013-05-20

Associated revisions

Revision 991cd8ae (diff)
Added by Daniel Lobato Garcia about 6 years ago

fixes #2498 FactNames are not precreated

Witlessbird's fix to reduce database lookups and do Ruby hash lookups instead

Revision 7a158256 (diff)
Added by Daniel Lobato Garcia about 6 years ago

fixes #2498 FactNames are not precreated

Witlessbird's fix to reduce database lookups and do Ruby hash lookups instead
(cherry picked from commit 991cd8ae19d87fc76adf97e18297bb593721e546)

History

#1 Updated by Greg Sutcliffe about 6 years ago

  • Status changed from New to Ready For Testing

#2 Updated by Daniel Lobato Garcia about 6 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF