rubyforgood/casa

fix SupervisorsController#index N+1 issues

Closed this issue · 1 comments

What type(s) of user does this feature affect?

  • supervisors
  • admins
  • volunteers

Description

This controller action has issues with N+1 queries (method call makes an additional method call for each item it finds.)

You can see these in our scout: https://scoutapm.com/shares/25925ed7-ff6a-4ec3-b590-976cd36de2d3

Go through all the methods to ensure all the needed data is preloaded in the first query and no additional calls to the database need to be made.

N+1 Resources

How to access the QA site

Login Details:
Link to QA site

Login Emails:

password for all users: 12345678

Questions? Join Slack!

We highly recommend that you join us in slack #casa channel to ask questions quickly. And discord for office hours (currently Tuesday 5-7pm Pacific), stakeholder news, and upcoming new issues.

@elasticspoon I can take this one.