Skip to content
Snippets Groups Projects
Commit dfd6c3f8 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Merge branch 'use-git-branch-merged' into 'master'

Fetch the merged branches at once.

Checking it one by one in the view. We don't cache this yet
because this would already much improve the performance.

A naive test against a particularly large repository:

``` ruby
begin
  now = Time.now
  branches.map{ |b| r.merged_to_root_ref?(b.name) }
  Time.now - now
end # 8.265830782
```

Around 10 times faster:

``` ruby
begin
  now = Time.now
  r.merged_branches(branches.map(&:name))
  Time.now - now
end # 0.807405397
```

This should make the branches page usable.

See merge request gitlab-org/gitlab-ce!14729
parents 7c4da276 57d7ed05
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment