Speed up todos queries by limiting the projects set we join with
What does this MR do?
Speed up todos queries by limiting the projects set we join with. Todo queries time in dashboard/todos
dropped from ~1.5 seconds to ~250ms for my account on production.
Are there points in the code the reviewer needs to double check?
N/A
Why was this MR needed?
Counting and/or listing all todos for a user can be slow if there are lots of projects he can access.
What are the relevant issue numbers?
Screenshots (if relevant)
N/A
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added -
Tests -
Added for this feature/bug -
All builds are passing
-
-
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together