gate-sso / gate

Gate is MFA Enabled SSO Platform that supports SAML, OAuth, Linux shell login and CAS
https://gate-sso.github.io
MIT License
203 stars 53 forks source link

Perf optimization #100

Closed giosakti closed 6 years ago

giosakti commented 6 years ago

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.