Project

General

Profile

Actions

Refactor #8790

closed

N+1 on user list page

Added by Tomer Brisker almost 10 years ago. Updated over 6 years ago.

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

Description

I get the following on the users list page:

N+1 Query detected
  User => [:cached_usergroups]
  Add to your finder: :include => [:cached_usergroups]
N+1 Query method call stack
  /home/tbrisker/foreman/app/models/user.rb:138:in `admin?'
  /home/tbrisker/foreman/app/views/users/index.html.erb:23:in `block in _app_views_users_index_html_erb___2625566761564459765_130883920'
  /home/tbrisker/foreman/app/views/users/index.html.erb:17:in `_app_views_users_index_html_erb___2625566761564459765_130883920'
  /home/tbrisker/foreman/app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
  /home/tbrisker/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
Actions

Also available in: Atom PDF