Red Hat Bugzilla – Bug 1231369
Slow UI Response Time on Content View Page viewing published versions
Last modified: 2017-08-11 05:22:51 EDT
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.
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.
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.
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)
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