Bug #18704

packages page is slow

Added by Brad Buckingham 5 months ago. Updated 24 days ago.

Status:Closed
Priority:High
Assigned To:Justin Sherrill
Category:API
Target version:Team Brad - Iteration 16
Difficulty:hard Pull request:https://github.com/Katello/katello/pull/6833
Bugzilla link:1419139
Story points-
Velocity based estimate-
ReleaseKatello 3.4.3Release relationshipAuto

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1419139

Description of problem:

If the katello install has a large number of packages, the packages page can be very slow (over 18 seconds). In particular, this API call takes quite some time to return:

https://localhost/katello/api/v2/packages?organization_id=1&page=1&paged=true&search=

Ideally, the page would load in less than 5 seconds.

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

Steps to Reproduce:
1. sync a bunch of repos containing numerous packages
2. go to content -> packages page
3. wait

Actual results: 18+ seconds of waiting

Expected results: 5 or less seconds of waiting

Additional info:

2017-02-03 11:49:07 [app] [I] Started GET "/katello/api/v2/packages?organization_id=1&page=2&paged=true&search=" for 10.10.121.39 at 2017-02-03 11:49:07 -0500
2017-02-03 11:49:07 [app] [I] Processing by Katello::Api::V2::PackagesController#index as JSON
2017-02-03 11:49:07 [app] [I] Parameters: {"organization_id"=>"1", "page"=>"2", "paged"=>"true", "search"=>"", "api_version"=>"v2"}
2017-02-03 11:49:18 [app] [I] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.95/app/views/katello/api/v2/packages/index.json.rabl within katello/api/v2/layouts/collection (3513.7ms)
2017-02-03 11:49:18 [app] [I] Completed 200 OK in 10947ms (Views: 22.9ms | ActiveRecord: 10829.9ms)

the SQL is too big to paste, but the explain is at https://explain.depesz.com/s/JZG

Associated revisions

Revision f3d1a0da
Added by Justin Sherrill 24 days ago

Fixes #18704 - improve packages api performance

History

#1 Updated by Brad Buckingham 5 months ago

  • Subject changed from packages page is slow to packages page is slow
  • Target version set to Team Brad - Iteration 11
  • Release set to Katello Backlog

#2 Updated by Brad Buckingham 4 months ago

  • Target version changed from Team Brad - Iteration 11 to Team Brad - Iteration 12

#3 Updated by John Mitsch 4 months ago

  • Assigned To set to John Mitsch

#4 Updated by Brad Buckingham 4 months ago

  • Target version changed from Team Brad - Iteration 12 to Team Brad - Iteration 13

#5 Updated by Brad Buckingham 3 months ago

  • Target version changed from Team Brad - Iteration 13 to Team Brad - Iteration 14

#6 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Release deleted (Katello Backlog)
  • Pull request https://github.com/Katello/katello/pull/6772 added

#7 Updated by Justin Sherrill 3 months ago

  • Release set to Katello 3.4.0

#8 Updated by Justin Sherrill 2 months ago

  • Release changed from Katello 3.4.0 to Katello 3.4.1

#9 Updated by Brad Buckingham 2 months ago

  • Target version changed from Team Brad - Iteration 14 to Team Brad - Iteration 15

#10 Updated by John Mitsch 2 months ago

  • Status changed from Ready For Testing to New
  • Assigned To deleted (John Mitsch)
  • Pull request deleted (https://github.com/Katello/katello/pull/6772)

#11 Updated by Justin Sherrill about 1 month ago

  • Release changed from Katello 3.4.1 to Katello 3.4.2

#12 Updated by Brad Buckingham about 1 month ago

  • Target version changed from Team Brad - Iteration 15 to Team Brad - Iteration 16

#13 Updated by Justin Sherrill about 1 month ago

  • Release changed from Katello 3.4.2 to Katello 3.4.3

#14 Updated by Justin Sherrill 29 days ago

  • Assigned To set to Justin Sherrill
  • Difficulty set to hard

#15 Updated by The Foreman Bot 29 days ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6833 added

#16 Updated by Justin Sherrill 24 days ago

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

Also available in: Atom PDF