Bug #13671
closedcreating a product reindexes all subscriptions
Description
currently creating a product reindexes all the subscriptions for an organization. This takes ~6.5 seconds causing the full task for creating a product to take 8 seconds. We should improve this.
Updated by Eric Helms almost 9 years ago
- Category set to Performance
- Translation missing: en.field_release set to 86
Updated by Chris Duryee almost 9 years ago
This issue causes product creation to get slower and slower as the number of products increases. It starts around 4 sec but can reach 20+ seconds.
To repro: hammer --username admin --password <pass> product create --name perf-product-7 --organization perf-org-1
run this 5-10 times, note increasing slowness
Ideally, the reindex can be sized for only the org in question instead of across all orgs.
NOTE: i took a look to find other areas where this happens, any caller of "import_all" in app/models/katello/glue/candlepin/candlepin_object.rb should be investigated to see if it can be limited to one org.
Updated by Chris Duryee almost 9 years ago
This same issue also affects the "Current Subscription Totals" dashboard widget. If you create 100 orgs and then load products into one of them, the dashboard can take > 30 sec to load.
"subscriptions = organizations.collect { |org| org.redhat_provider.index_subscriptions }.flatten" is called, which takes a lot of time.
This is being tracked in a different issue, the commits that fix both are in different areas.
Updated by Chris Duryee almost 9 years ago
- Status changed from New to Closed
- Pull request https://github.com/Katello/katello/pull/5886 added
should be fixed by https://github.com/Katello/katello/pull/5886, marking as closed.