Bug #24271

Edit Host as non-admin user is orders of magnitudes slower than as admin user

Added by Kavita Gaikwad over 1 year ago. Updated 10 months ago.

Target version:
Bugzilla link:
Fixed in Releases:
Found in Releases:


Cloned from

Description of problem:

Editing a host in the Satellite GUI takes significantly longer as a non-admin user than as an admin-user.

From the customer's data, as a non-admin user the /host/<hostid>/edit command takes 55 seconds and as the admin user, this command takes 4.713 seconds.

On our internal reproducer, the non-admin user editing /host/<hostid>/edit command takes 21.10 socends versus 1.89 seconds as the admin user.

Version-Release number of selected component (if applicable):


How reproducible:

Every time. Internal reproducer available.

Steps to Reproduce:
1. See private comment due to internal hostnames.

Associated revisions

Revision 7663c04b (diff)
Added by Kavita Gaikwad 10 months ago

Fixes #24271 - Edit Host as non-admin is slower than admin

For non-admin users, it takes more time in processing
common_parameters partials as comparative to admin.
Removed '.can?' method calls for checking edit & destroy
permissions on parameters and pre-calculated these permissions.

Revision 515cc445 (diff)
Added by Kavita Gaikwad 10 months ago

Refs #24271 - commit 2 with slower query change

Revision c73ee134 (diff)
Added by Kavita Gaikwad 10 months ago

Refs #24271 - extracted user check outside of authorizer

Revision fb1a2b10 (diff)
Added by Kavita Gaikwad 10 months ago

Refs #24271 - declared params_authorizer in partial than helper

Revision 17d37c9b (diff)
Added by Kavita Gaikwad 10 months ago

Refs #24271 - used param_authorizer as a local variable


#1 Updated by The Foreman Bot about 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request added

#2 Updated by Tomer Brisker 10 months ago

  • Assignee set to Kavita Gaikwad
  • Fixed in Releases 1.21.0 added

#3 Updated by Kavita Gaikwad 10 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF