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 #1

Updated by The Foreman Bot almost 10 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2036 added
  • Pull request deleted ()
Actions #2

Updated by Anonymous almost 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #3

Updated by Dominic Cleal almost 10 years ago

  • Category set to Database
  • Translation missing: en.field_release set to 28
Actions

Also available in: Atom PDF