Project

General

Profile

Actions

Bug #13671

closed

creating a product reindexes all subscriptions

Added by Justin Sherrill almost 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Performance
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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.

Actions #1

Updated by Eric Helms almost 9 years ago

  • Category set to Performance
  • Translation missing: en.field_release set to 86
Actions #2

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.

Actions #3

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.

Actions #4

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.

Actions #5

Updated by Mike McCune over 8 years ago

  • Bugzilla link set to 1330311
Actions

Also available in: Atom PDF