rubyforgood / casa

Volunteer management system for nonprofit CASA, which serves foster youth in counties across America.
https://casavolunteertracking.org/
MIT License
314 stars 478 forks source link

fix VolunteersController#edit N+1 issues #5894

Closed elasticspoon closed 1 month ago

elasticspoon commented 4 months ago

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

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

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.

Naraveni commented 3 months ago

hey, can I work on this

elasticspoon commented 3 months ago

Go for it

github-actions[bot] commented 3 months ago

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

github-actions[bot] commented 3 months ago

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.

ElisaRmz commented 2 months ago

Hi! Could I work on this? @elasticspoon

elasticspoon commented 2 months ago

@ElisaRmz absolutely. lemme know if you have any issue with the scout link

ElisaRmz commented 2 months ago

@elasticspoon, I can't access to the link of the Description: https://scoutapm.com/shares/5ebf4b86-2f24-46d1-94da-129efef60c43

elasticspoon commented 2 months ago

https://scoutapm.com/shares/7590bdb4-042d-438b-b330-bf20ea1874e1 try that

ElisaRmz commented 2 months ago

It works, thanks!

github-actions[bot] commented 1 month ago

This issue has been inactive for 245 hours (10.21 days) and will be unassigned after 115 more hours (4.79 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

ElisaRmz commented 1 month ago

Working on it

ElisaRmz commented 1 month ago

@elasticspoon, I can't access this link https://scoutapm.com/shares/7590bdb4-042d-438b-b330-bf20ea1874e1, Does it work only for some time?

elasticspoon commented 1 month ago

Interesting. We are on some free version of scout so its possible that it just expired. https://scoutapm.com/shares/cf2dc01b-92fb-42a9-86e5-d700318139a6

github-actions[bot] commented 1 month ago

This issue has been inactive for 249 hours (10.38 days) and will be unassigned after 111 more hours (4.63 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

ElisaRmz commented 1 month ago

Working on it

github-actions[bot] commented 1 month ago

This issue has been inactive for 246 hours (10.25 days) and will be unassigned after 114 more hours (4.75 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time