Projects::TreeController#show is slow because of multiple things
It looks like the p99 for SQL has spikes to 4 seconds, git has spikes to 15 seconds. It also looks like the mean of SQL queries executed is at 30.
Check live metrics here
I think that this controller can be optimized both from the git and the database perspective.
From the git perspective it looks like the main WALL Clock timings come from Rugged::TagCollection#each_tag
cc/ @andrewn