On the home page, we currently build status counts and display them on the application tiles in the left nav. For example, Maniphest shows a count of assigned tasks and Differential shows assigned reviews.
These queries don't use limits, so a user who legitimately has thousands of assigned tasks will end up loading them all.
We should:
- Limit these queries to something like 100 results, and show "99+" if there are more than 99, so a user with a large number of legitimate assigned tasks isn't paying a huge cost to load a ton of them (showing a count like "3920" is unlikely to be useful, anyway).
- In the Maniphest case, we could make the Maniphest query more efficient by issuing a raw query instead of a proper ManiphestTaskQuery, which does additional data fetching and policy checks. We don't technically need to policy check the results because the owner of a task can always see it. Not sure if this is really worth it. If we want to press the performance issue here we should really add caches or consider removing the feature (I'm not sure how useful it is).
Support Impact This is a scalability issue which impacts large Maniphest installs, including WMF.