Project

General

Profile

Actions

Bug #16238

closed

dashboard widget for latests events can be exteramlly slow

Added by Ohad Levy over 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Performance
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

when having many hosts, the latest event widget can take around a minute to load.

the line in question is most likely the issue:

 def latest_events
    # 9 reports + header fits the events box nicely...
    @latest_events ||= ConfigReport.authorized(:view_config_reports).my_reports.interesting.where(:host_id => hosts.pluck(:id)).search_for('reported > "7 days ago"').limit(9).includes(:host)
 end

Related issues 4 (0 open4 closed)

Related to Foreman - Bug #16044: Errors in individual dashboard widgets fail entire pageClosedTomer Brisker08/10/2016Actions
Related to Foreman - Bug #16627: Puppet general tab new error on 1.12.3ClosedTomer Brisker09/20/2016Actions
Related to Foreman - Bug #16704: Searching fails on dashboardClosedTomer Brisker09/27/2016Actions
Related to Foreman - Bug #18893: dashboard widget for puppet report latest events can be very slow on large amount of reportsClosedTomer Brisker03/14/2017Actions
Actions

Also available in: Atom PDF