gitlab-org--gitlab-foss/app
Yorick Peterse 6ec53f5d48
Cache the number of open issues and merge requests
Every project page displays a navigation menu that in turn displays the
number of open issues and merge requests. This means that for every
project page we run two COUNT(*) queries, each taking up roughly 30
milliseconds on GitLab.com. By caching these numbers and refreshing them
whenever necessary we can reduce loading times of all these pages by up
to roughly 60 milliseconds.

The number of open issues does not include confidential issues. This is
a trade-off to keep the code simple and to ensure refreshing the data
only needs 2 COUNT(*) queries instead of 3. A downside is that if a
project only has 5 confidential issues the counter will be set to 0.

Because we now have 3 similar counting service classes the code
previously used in Projects::ForksCountService has mostly been moved to
Projects::CountService, which in turn is reused by the various service
classes.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36622
2017-08-23 13:42:29 +02:00
..
assets Merge branch '36648-fix-backoff-util-tests' into 'master' 2017-08-18 10:05:11 +00:00
controllers Document project templates and link to it 2017-08-17 09:41:09 +02:00
finders Pending delete projects no longer return 500 error in Admins projects view 2017-08-11 11:45:09 +01:00
helpers Add support for i18n on Project Activity Page 2017-08-18 10:00:32 +00:00
mailers Speed up Group#user_ids_for_project_authorizations 2017-08-14 12:47:15 +01:00
models Cache the number of open issues and merge requests 2017-08-23 13:42:29 +02:00
policies
presenters
serializers Merge branch 'rs-trailingwhitespace-cop' into 'master' 2017-08-16 10:27:46 +00:00
services Cache the number of open issues and merge requests 2017-08-23 13:42:29 +02:00
uploaders Make sure uploads for personal snippets are correctly rendered 2017-08-11 18:15:02 +02:00
validators
views Cache the number of open issues and merge requests 2017-08-23 13:42:29 +02:00
workers Merge branch 'ee-2628-backport-to-ce' into 'master' 2017-08-17 13:53:39 +00:00