Bug #23608
closedENC with smart class parameters is slow (regression with 1.16)
Description
If a host uses a lot of smart class parameters (50+), running the ENC gets awful slow. Runtimes of 10 or more seconds have been reported. The runtime grows linear with the number of parameters.
Classification::ValuesHashQuery#values_hash is used to retrieve all the parameters used in the ENC. For each key this method calls lookup_values_cache with the same parameters. The called method assembles a database query, which is pretty slow, even if it never shows up in the ActiveRecord time and just runs against the cache.
The simple fix just calculates the result of lookup_values_cache once.
However I'm not sure if this code is even correct now, as different parameters can have different orders.
Updated by The Foreman Bot over 6 years ago
- Pull request https://github.com/theforeman/foreman/pull/5583 added
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
Updated by Anonymous over 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset a538c9b5cad07ebbf729cc6202941115d2a4d94d.
Updated by The Foreman Bot over 6 years ago
- Assignee set to Anonymous
- Pull request https://github.com/theforeman/foreman/pull/5602 added
Updated by Marek Hulán over 6 years ago
- Translation missing: en.field_release set to 359
Updated by Ewoud Kohl van Wijngaarden over 6 years ago
- Triaged set to No
- Fixed in Releases 1.16.2, 1.17.2 added
- Found in Releases 1.16.1 added