Project

General

Profile

Actions

Bug #27332

closed

List all hosts page in an organization takes long time when there is a lot of reports

Added by Hao Yu almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Description of problem:
Satellite is taking long time to load the All Host page in an organization when there is a lot of reports.

There is a default scope in "app/models/foreman_openscap/arf_report.rb"

default_scope do
with_taxonomy_scope do
order("#{self.table_name}.created_at DESC")
end
end

With "Organization.current" set, the above function will try to filter the reports by organization. This seems to cause ruby to take long time to construct a list of report ids in an organization to be filtered when there is a lot of reports in an organization.

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

Steps to Reproduce:
1. Need to have many content hosts that run openscap scan and upload the reports to the Satellite.
2. Make sure "Any organization" is set
3. Go to Hosts -> All Hosts page
4. The page should finish loading within an acceptable time.
5. Now, set the organization.
6. Refresh the "All Hosts" page again
7. The page will take several minutes to load.

Actual results:
"All hosts" page takes long time to load

Expected results:
"All hosts" page should finish loading within an acceptable time.


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #26760: Audits page is very slowClosedTomer BriskerActions
Actions #1

Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_openscap/pull/402 added
Actions #2

Updated by The Foreman Bot almost 5 years ago

  • Fixed in Releases foreman_openscap 1.0.5 added
Actions #3

Updated by Ondřej Pražák almost 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Ondřej Pražák almost 5 years ago

  • Related to Bug #26760: Audits page is very slow added
Actions

Also available in: Atom PDF