Project

General

Profile

Refactor #3016

accessible_hostgroups method unnecessarily sorts in memory

Added by Ohad Levy over 8 years ago. Updated over 3 years ago.

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

Description

since we added the full label to the db, we can ask the db to sort for us.

see source:app/helpers/hosts_and_hostgroups_helper.rb#L20

Associated revisions

Revision 9aba9695 (diff)
Added by Tomer Brisker almost 7 years ago

Fixes #3016 - Sort accesible hostgroups by db instead of in memory

History

#1 Updated by Ohad Levy over 8 years ago

also, changing the order to check first for an admin should improve the query a bit (when you are an admin).

#2 Updated by The Foreman Bot almost 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2215 added

#3 Updated by Tomer Brisker almost 7 years ago

  • Assignee set to Tomer Brisker

#4 Updated by Anonymous almost 7 years ago

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

#5 Updated by Marek Hulán almost 7 years ago

  • Category set to Performance
  • Legacy Backlogs Release (now unused) set to 35

Also available in: Atom PDF