Project

General

Profile

Bug #13993

"Current Subscription Status" widget gets slower as more orgs are added

Added by Chris Duryee over 4 years ago. Updated about 2 years ago.

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

Description

The "current subscription status" widget on the dashboard gets extremely slow as more orgs are on the system. Specifically:

https://github.com/Katello/katello/blob/068062449b30e985695aa6071837290e4afbd3df/app/views/dashboard/_subscription_status_widget.html.erb#L5-L9

loops over all orgs to create stub objects, then populates them. This is done one per org, but there is an outer loop that loops over all orgs again, causing extreme slowness (30 sec to render with 100 orgs).

Associated revisions

Revision 45d3394b (diff)
Added by Chris Duryee over 4 years ago

Fixes #13993 - current subscription status widget pulled in too much data

Previously, the subscription status widget requested all subscriptions via a
call to `index_subscriptions`. This refreshes all of the data in Katello with
the latest from candlepin, to work around other issues where some updates to CP
were not being caught.

These other issues have been resolved, so the call to index is no longer
needed. Instead, just fetch the info we need from Katello's copy of the Pool
data.

Additionally, the subscription status widget was showing counts for ALL orgs.
For example, if org A had 10 subscriptions, and org B had zero, the dashboard
would still show 10 subs even after switching from A to B in the web UI.

Some before/after data:

  • no patch, org with 12 subs: 89 candlepin calls
  • no patch, org with zero subs: 89 candlepin calls
  • with patch, org with 12 subs: 24 candlepin calls
  • with patch, org with no subs: 0 candlepin calls

Revision 9c2e6a9f
Added by Eric Helms over 4 years ago

Merge pull request #5864 from beav/13993

Fixes #13993 - only index one candlepin org when reindexing

History

#1 Updated by Eric Helms over 4 years ago

  • Legacy Backlogs Release (now unused) set to 86

#2 Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5864 added

#3 Updated by Chris Duryee over 4 years ago

  • Status changed from Ready For Testing to New
  • Bugzilla link set to 1313723
  • Pull request deleted (https://github.com/Katello/katello/pull/5864)

small update: there is only a single org loop, not an inner + outer. it is still way slow though as # of orgs increases:)

#4 Updated by Chris Duryee over 4 years ago

  • Pull request https://github.com/Katello/katello/pull/5864 added

#5 Updated by Chris Duryee over 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Chris Duryee

#6 Updated by The Foreman Bot over 4 years ago

  • Status changed from Assigned to Ready For Testing

#7 Updated by Chris Duryee over 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF