fix VolunteersController#edit N+1 issues
Opened this issue · 9 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/5ebf4b86-2f24-46d1-94da-129efef60c43
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
- sample PR #5868
- https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations
- https://medium.com/doctolib/how-to-find-fix-and-prevent-n-1-queries-on-rails-6b30d9cfbbaf
- https://github.com/flyerhzm/bullet?tab=readme-ov-file#log
How to access the QA site
Login Details:
Link to QA site
Login Emails:
- volunteer1@example.com view site as a volunteer
- supervisor1@example.com view site as a supervisor
- casa_admin1@example.com view site as an admin
- all_casa_admin1@example.com view site as an all casa admin
- go to
/all_casa_admins/sign_in
- go to
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.
hey, can I work on this
Go for it
This issue has been inactive for 262 hours (10.92 days) and will be unassigned after 98 more hours (4.08 days). If you have questions, please
If you are still working on this, comment here to tell the bot to give you more time
This issue has been inactive for 382 hours (15.92 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you again for your contribution to this project.
Hi! Could I work on this?
@elasticspoon
@ElisaRmz absolutely. lemme know if you have any issue with the scout link
@elasticspoon, I can't access to the link of the Description:
https://scoutapm.com/shares/5ebf4b86-2f24-46d1-94da-129efef60c43
It works, thanks!