Project

General

Profile

« Previous | Next » 

Revision aeba4f42

Added by Ivan Necas about 8 years ago

Fixes #14503 - don't join reports with the logs and resources explicitly in API

Using `.includes(:logs => [:message, :source])` in the search scope
for reports caused serious performance issues (ending up with server
taking all of its memory). I've found no reason for the `includes` to
actually be there (we don't render the logs in the views) and should
be safe to just remove it.

View differences:

app/controllers/api/v1/reports_controller.rb
@reports = ConfigReport.
authorized(:view_config_reports).
my_reports.
includes(:logs => [:source, :message]).
search_for(*search_options).paginate(paginate_options)
end

Also available in: Unified diff