Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1231369

Summary: Slow UI Response Time on Content View Page viewing published versions
Product: Red Hat Satellite Reporter: Alex Krzos <akrzos>
Component: PerformanceAssignee: Chris Duryee <cduryee>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: aupadhye, bbuckingham, bkearney, cduryee, cwelton, dkaylor, jcallaha, mmccune, oshtaier, perfbz
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-14 21:02:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
production.log snippet with foreman debug on none

Description Alex Krzos 2015-06-12 20:22:45 UTC
Created attachment 1038140 [details]
production.log snippet with foreman debug on

Description of problem:
Created several content views and published one more than 200 times.  When attempting to view this page and see all of the versions published the UI is very slow to respond.  In my environment the page load required more than 149s.  The page does display a spinner however I think we can do way better on rendering a page or at least paginate the version to reduce the load time.

Version-Release number of selected component (if applicable):
Satellite 6.1 GA SNAP2

How reproducible:
Always in this environment

Steps to Reproduce:
1. Create Content-View and publish many versions ( > 200)
2.
3.

Actual results:
2015-06-12 16:03:03 [I] Processing by Katello::Api::V2::ContentViewsController#show as JSON
2015-06-12 16:03:03 [I]   Parameters: {"organization_id"=>"1", "api_version"=>"v2", "id"=>"2"}
2015-06-12 16:03:03 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.38/app/views/katello/api/v2/content_views/show.json.rabl within katello/api/v2/layouts/resource (387.4ms)
2015-06-12 16:03:03 [I] Completed 200 OK in 393ms (Views: 317.4ms | ActiveRecord: 71.4ms)
2015-06-12 16:03:03 [I] Processing by Katello::Api::V2::ContentViewVersionsController#index as JSON
2015-06-12 16:03:03 [I]   Parameters: {"content_view_id"=>"2", "full_result"=>"true", "api_version"=>"v2"}
2015-06-12 16:05:33 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.38/app/views/katello/api/v2/content_view_versions/index.json.rabl within katello/api/v2/layouts/index (149606.6ms)
2015-06-12 16:05:33 [I] Completed 200 OK in 149855ms (Views: 42539.1ms | ActiveRecord: 107304.1ms)

Expected results:
< 3s loading time 

Additional info:

$ grep "select" -i production.log -c
4004
$ grep "cache" -i production.log -c
647
$ grep "completed" -i production.log
2015-06-12 16:14:43 [I] Completed 200 OK in 1347ms (Views: 1243.9ms | ActiveRecord: 85.7ms)
2015-06-12 16:17:11 [I] Completed 200 OK in 149372ms (Views: 41691.1ms | ActiveRecord: 107671.9ms)

Note the amount of time spent in ActiveRecord and number of queries.

Comment 1 RHEL Program Management 2015-06-12 20:42:31 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 7 Chris Duryee 2016-08-18 15:43:50 UTC
I tested this on 6.2.0 via the following:

* create a CV
* for x in `seq 1 100`; do hammer --username admin --password changeme content-view publish --id 2; done

After creating 100+ content views, the content_views/2/versions page still loaded in 4.4 sec for me. Additionally, it did not seem to slow down as new versions were published.

moving to ON_QA.

QE note: the original expected behavior in the bug report was less than 3 sec. I get 4 seconds and sometimes up to 8 depending on system load, but it is still better than 149 sec.

Comment 8 jcallaha 2016-09-09 21:22:52 UTC
Verified in Satellite 6.2.2 Snap 1.1

created multiple content views with varying levels of content (one more than 50,000+ packages and 50 puppet repos). Test content view had 205 versions.

2016-09-09 17:20:24 [app] [I] Completed 200 OK in 359ms (Views: 243.4ms | ActiveRecord: 41.3ms)
2016-09-09 17:20:27 [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.78/app/views/katello/api/v2/content_view_versions/index.json.rabl within katello/api/v2/layouts/collection (2780.2ms)
2016-09-09 17:20:27 [app] [I] Completed 200 OK in 2797ms (Views: 2681.5ms | ActiveRecord: 106.3ms)

Comment 10 errata-xmlrpc 2016-09-14 21:02:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1885