"Current Subscription Status" widget gets slower as more orgs are added
The "current subscription status" widget on the dashboard gets extremely slow as more orgs are on the system. Specifically:
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).
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
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
#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 (
small update: there is only a single org loop, not an inner + outer. it is still way slow though as # of orgs increases:)