From ebc0943713196abe939e445f35e0f726f5cbee1e Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 10 Mar 2017 15:13:48 -0500 Subject: templates/repo: only show Git stats in repository home page (#3518) Move 'Commits' and 'Releases' tabs down to body. This patch also reduces page load time for pages that do not need to use commits count anywhere. Get commits count can hurt performance badly for huge repositories that has tens of thousands commits like Linux Kernel. --- modules/context/repo.go | 7 ------- 1 file changed, 7 deletions(-) (limited to 'modules/context') diff --git a/modules/context/repo.go b/modules/context/repo.go index 398b32c0..6a2911a7 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -456,13 +456,6 @@ func RepoRef() macaron.Handler { } } ctx.Data["PullRequestCtx"] = ctx.Repo.PullRequest - - ctx.Repo.CommitsCount, err = ctx.Repo.Commit.CommitsCount() - if err != nil { - ctx.Handle(500, "CommitsCount", err) - return - } - ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount } } -- cgit v1.2.3