gitlab-org--gitlab-foss/app/views/layouts/nav
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
..
_admin.html.haml Add Conversational Development Index page to admin panel 2017-06-01 17:37:21 +02:00
_admin_settings.html.haml
_breadcrumbs.html.haml Merge branch '34036-sidebar-mobile' into 'master' 2017-07-20 09:49:30 +00:00
_dashboard.html.haml Simplify width for dropdown-menu on mobile 2017-07-18 23:57:42 +00:00
_explore.html.haml
_group.html.haml Add active state for pipelines settings on old nav 2017-08-03 17:42:48 -05:00
_new_admin_sidebar.html.haml Fix the fly-out menu in the sidebar not displaying in Safari 2017-08-15 09:28:00 +01:00
_new_dashboard.html.haml Contextual breadcrumb title fixes 2017-07-03 10:45:40 +01:00
_new_explore.html.haml added signed out subnav 2017-06-21 14:45:23 +01:00
_new_group_sidebar.html.haml Fix the fly-out menu in the sidebar not displaying in Safari 2017-08-15 09:28:00 +01:00
_new_profile_sidebar.html.haml Fix the fly-out menu in the sidebar not displaying in Safari 2017-08-15 09:28:00 +01:00
_new_project_sidebar.html.haml Cache the number of open issues and merge requests 2017-08-23 13:42:29 +02:00
_profile.html.haml add profile gpg key page to manage gpg keys 2017-07-27 15:40:41 +02:00
_project.html.haml Cache the number of open issues and merge requests 2017-08-23 13:42:29 +02:00