Description of problem: Loading the list of possible repositories to add to a content view take an excessive amount of time. On my test Satellite I only have ~28 repositories and it took over 90 seconds for this list to be generated. For our customers with many more repositories this will be an order of magnitude larger Version-Release number of selected component (if applicable): Sat-6.1.2 How reproducible: Steps to Reproduce: 1. Go to a content view 2. Select "Yum Content > Repositories" 3. Select "Add" Actual results: Waiting. a lot of it Expected results: This should not take this long for so few repositories Additional info: the foreman rake process was taking 90-100% cpu time for most of this. foreman production log for this ** Select "Yum Content > Repositories" - this is the current list ** with 2 repositories 2015-10-08 16:39:36 [I] Processing by Katello::Api::V2::RepositoriesController#index as JSON 2015-10-08 16:39:36 [I] Parameters: {"content_type"=>"yum", "content_view_id"=>"9", "full_result"=>"true", "organization_id"=>"3", "page"=>"1", "search"=>"", "api_version"=>"v2"} 2015-10-08 16:39:49 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.67/app/views/katello/api/v2/repositories/index.json.rabl within katello/api/v2/layouts/collection (12270.3ms) 2015-10-08 16:39:49 [I] Completed 200 OK in 13345ms (Views: 12097.3ms | ActiveRecord: 216.8ms) ** Select "Add" tab - this is the one that takes ~90s 2015-10-08 16:40:04 [I] Processing by Katello::Api::V2::RepositoriesController#index as JSON 2015-10-08 16:40:04 [I] Parameters: {"content_type"=>"yum", "full_result"=>"true", "library"=>"true", "organization_id"=>"3", "page"=>"1", "search"=>"", "api_version"=>"v2"} 2015-10-08 16:41:36 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.67/app/views/katello/api/v2/repositories/index.json.rabl within katello/api/v2/layouts/collection (91816.2ms) 2015-10-08 16:41:36 [I] Completed 200 OK in 92218ms (Views: 91438.5ms | ActiveRecord: 383.6ms)
this is likely solved by 6.2
Certainly looks an order of magnitude better to me This is from my sat 6.2 test system which is running on the same hardware model as my 6.1 test system. 2016-08-30 09:33:22 [app] [I] Processing by Katello::Api::V2::RepositoriesController#index as JSON 2016-08-30 09:33:22 [app] [I] Parameters: {"available_for"=>"content_view", "content_type"=>"yum", "content_view_id"=>"3", "full_result"=>"true", "library"=>"true", "organization_id"=>"1", "page"=>"1", "search"=>"", "api_version"=>"v2"} 2016-08-30 09:33:22 [app] [I] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.70/app/views/katello/api/v2/repositories/index.json.rabl within katello/api/v2/layouts/collection (455.3ms) 2016-08-30 09:33:22 [app] [I] Completed 200 OK in 496ms (Views: 325.2ms | ActiveRecord: 141.6ms) versus what I put in the original bug report 2015-10-08 16:40:04 [I] Processing by Katello::Api::V2::RepositoriesController#index as JSON 2015-10-08 16:40:04 [I] Parameters: {"content_type"=>"yum", "full_result"=>"true", "library"=>"true", "organization_id"=>"3", "page"=>"1", "search"=>"", "api_version"=>"v2"} 2015-10-08 16:41:36 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.67/app/views/katello/api/v2/repositories/index.json.rabl within katello/api/v2/layouts/collection (91816.2ms) 2015-10-08 16:41:36 [I] Completed 200 OK in 92218ms (Views: 91438.5ms | ActiveRecord: 383.6ms)