After doing some profiling, these enhancement should speedup nss_controller a bit. I also rewrite sysadmins query in host_machine.rb to avoid N+1 queries problem.
I understand that we already have redis cache in place, but currently it sets to expire every 5 minutes, so we should increase some actions performance in nss_controller (without cache) to acceptable level.
After doing some profiling, these enhancement should speedup
nss_controller
a bit. I also rewritesysadmins
query inhost_machine.rb
to avoid N+1 queries problem.I understand that we already have redis cache in place, but currently it sets to expire every 5 minutes, so we should increase some actions performance in
nss_controller
(without cache) to acceptable level.