From b595f81b7908fa317879fc1223f6fc41e997ae6d Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 22 May 2025 13:54:42 -0700 Subject: 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. --- cmd/hook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/hook.go') 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 ( -- cgit v1.2.3