Bug #9564
closedContent View index page takes a long time to list
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1177609
Description of problem:
Similar to issue BZ1161636 for the ContentViewVersions, also the index of the Content View page takes a long time. See below results on a VM with 4vCPUs and 16MB that it takes 45 seconds to list only 14 CVs:
- time curl -K /opt/hoici/etc/curl-hoici.conf -H 'Content-Type: application/json' -d '{"per_page":9999}' -XGET https://localhost/katello/api/v2/organizations/4/content_views > p1.json
user 0m0.201s
sys 0m0.075s
- ls
l p1.json1 root root 188770 Dec 29 12:02 p1.json
-rw-r--r- - cat p1.json | jq .results[].id | wc -l
14 - cat p1.json | jq .results[].puppet_modules[].id | wc -l
295
- cat p1.json | jq .results[].repositories[].product.sync_plan.id | wc -l
60 - cat p1.json | jq .results[].repositories[].product.sync_plan.products[].id 2> /dev/null | wc -l
258
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Create 10 Products (or use RHEL products)
2. Create 1 Sync plan with all 10 Products
3. Create 50 Puppet modules
4. Create 20 CVs with the products and puppet modules
5. List the CVs
Actual results:
Expected results:
List of CVs returned within 5 seconds
Additional info:
There might be more places where too much detailed information is inherited by including the "show" views of the relations in the index part. Maybe create a index-show and a detailed-show view per resource type. The index-show will be included in the index views or relationship includes. The detailed-show will be used only for the show option to display the resource itself.