Gitlab "commits" tab is horribly slow repository with large number of branches/tags
Created by: awkay
Hi,
I have a large project (48k files, 12,000+ commits). I've run all of the gitlab checks (5.2-stable, ruby 2.0).
Everything functions properly, other than the rendering time for the "commits" page is so slow as to be useless:
Rendered commits/_commit.html.haml (9270.2ms) Rendered commits/_commit.html.haml (1576.1ms) Rendered commits/_commits.html.haml (13446.9ms) Rendered commits/show.html.haml within layouts/project_resource (13908.0ms) Rendered layouts/_head.html.haml (532.7ms) Rendered layouts/_search.html.haml (59.3ms) Rendered layouts/_head_panel.html.haml (185.8ms) Rendered layouts/_init_auto_complete.html.haml (22.6ms) Rendered layouts/_flash.html.haml (3.0ms) Rendered shared/_no_ssh.html.haml (10.0ms) Rendered layouts/nav/_project.html.haml (44.3ms) Completed 200 OK in 16669ms (Views: 14664.9ms | ActiveRecord: 95.0ms)
Running on modern CPU (16-core AMD), 16GB RAM.
When this particular page loads, ruby is pegged on a single CPU (100%...obviously a single thread that is consuming an entire CPU).
Through the conversation below, I have determined that it is due to the large number of branches and tags on this repository. I have 1500+ branches, and 572 tags. When I cloned this repo, and removed the extra branches/tags, the speed went up to acceptable levels.