-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: reduce the number of queries in the dashboard by eager loading the contacts #2138
Conversation
👍 |
That is awesome ❤️ I love those optimizations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Thank you @AdrienPoupa !
You're welcome! However, before merging, be aware that I added a new commit that reduces the number of queries even more for partial contacts (41 queries now on the same installation, 120ms) |
Thank you very much @AdrienPoupa ! |
This pull request has been automatically locked since there |
The following pull request eager loads the contacts for the reminders in the dashboard, in
getRemindersForMonth
Since contacts are accessed several times from the _monthReminder view, load them from the beginning.
On my installation, adding the with line does the following:
As a bonus, if I had not any partial contact, the number of queries would drop to 27, 84ms and 6.60Mb