aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/hook.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2025-05-22 13:54:42 -0700
committerGitHub <noreply@github.com>2025-05-22 13:54:42 -0700
commitb595f81b7908fa317879fc1223f6fc41e997ae6d (patch)
tree934ba84d07cd7c109cadd8f224f46dd6a3046db8 /cmd/hook.go
parent06ccda06c49ae86187c1168a4610d814ea33362b (diff)
downloadgitea-b595f81b7908fa317879fc1223f6fc41e997ae6d.tar.gz
gitea-b595f81b7908fa317879fc1223f6fc41e997ae6d.zip
Performance optimization for tags synchronization (#34355)
The tags synchronization is very slow for a non-mirror repository with many tags especially forking. This PR make all repositories' tags synchronization use the same function and remove the low performance synchronization function. The commit count of tag now will not be stored into database when syncing. Since the commits count will always be read from cache or git data, the `NumCommits` in the release table will be updated for the first read from git data.
Diffstat (limited to 'cmd/hook.go')
-rw-r--r--cmd/hook.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/hook.go b/cmd/hook.go
index 41e3c3ce34..6f0aa5a203 100644
--- a/cmd/hook.go
+++ b/cmd/hook.go
@@ -24,7 +24,7 @@ import (
)
const (
- hookBatchSize = 30
+ hookBatchSize = 500
)
var (