1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-09 20:17:21 +00:00

Performance optimization for tags synchronization (#34355) (#34522)

Backport #34355 by @lunny

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.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Giteabot
2025-05-23 10:28:25 +08:00
committed by GitHub
parent 038990e0ff
commit 1162cbccc0
7 changed files with 31 additions and 190 deletions

View File

@ -24,7 +24,7 @@ import (
)
const (
hookBatchSize = 30
hookBatchSize = 500
)
var (