Skip to content

Save a query on the todos index page

What does this MR do?

When you're viewing the todos index without filters, use the cached value on the user object to get the total number of todos, rather than performing another query.

Are there points in the code the reviewer needs to double check?

Not sure. This is like https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13805, but simpler.

Why was this MR needed?

This query was the slowest on the todos page for me, and we don't even need it:

image

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

None - I just noticed it.

Edited by yorickpeterse-staging

Merge request reports

Loading