Project

General

Profile

Bug #9580

Loading Activation keys list slow

Added by Walden Raines about 8 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web UI
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1196742
Description of problem:
The Activion keys list is slow. It contains also a lot of not relevant data for the Katello users. E.g. the fields productAttributes and providedProducts are 33% of the data returned:

  1. time curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/katello/api/v2/organizations/4/activation_keys > act.json

real 0m17.244s
user 0m0.125s
sys 0m0.041s

  1. ls l act.json
    -rw-r--r-
    1 root root 484619 Feb 26 16:06 act.json
  2. hoi-json act.json --get ALL | wc -l
    14412
  3. hoi-json act.json --get ALL | egrep -v '(productAttributes|providedProducts)' | wc -l
    5786

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create 50 Activation keys
2. List activation keys
3.

Actual results:
Slow and big response in 20+ seconds

Expected results:
Result in 3 seconds and small response body with relevant data

Additional info:
Similiar to the BZ1177609 and BZ1161636

Associated revisions

Revision 2f7e0e56 (diff)
Added by Walden Raines about 8 years ago

Fixes #9580: fix N+1 queries on activation key list, BZ 1196742.

The activation key list page was loading slowly because of N+1
queries, this commit eager loads the relevant associations and
thus speeds up the page.

http://projects.theforeman.org/issues/9580
https://bugzilla.redhat.com/show_bug.cgi?id=1196742

Revision 172b2800
Added by Walden Raines about 8 years ago

Merge pull request #5061 from waldenraines/9580

Fixes #9580: fix N+1 queries on activation key list, BZ 1196742.

History

#1 Updated by The Foreman Bot about 8 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 67
  • Pull request https://github.com/Katello/katello/pull/5061 added
  • Pull request deleted ()

#2 Updated by Eric Helms about 8 years ago

  • Legacy Backlogs Release (now unused) set to 23
  • Triaged changed from No to Yes

#3 Updated by Walden Raines about 8 years ago

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

Also available in: Atom PDF