Show stale instead of merged if the branch is old

Closed username-removed-423915 requested to merge show-stale-branches into master

What does this MR do?

Show stale instead of merged if the branch is old

We consider the branch is old when the updated date was 3 months older than the default branch updated date.

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

Are people relying on that label?

Maybe we want to use another color for stale?

Why was this MR needed?

By doing so, it would greatly improve the performance in this page, because it's pretty costly to find if it's merged or not when the branch is far behind.

We assume that when it's old, it's probably far behind.

The idea was brought up in: https://gitlab.com/gitlab-org/gitlab-ce/issues/37429#note_42284280

Screenshots (if relevant)

Screen_Shot_2017-10-04_at_20.02.34

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

We're trying to improve BranchesController#index, https://gitlab.com/gitlab-org/gitlab-ce/issues/37429

Edited by username-removed-423915