Bug #13671
closed
creating a product reindexes all subscriptions
Added by Justin Sherrill about 9 years ago.
Updated over 6 years ago.
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.
- Category set to Performance
- Translation missing: en.field_release set to 86
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.
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.
- Status changed from New to Closed
- Pull request https://github.com/Katello/katello/pull/5886 added
- Bugzilla link set to 1330311
Also available in: Atom
PDF