diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-10-21 14:26:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-21 14:26:23 +0800 |
commit | 985a39590ba07798dd6e6097e0c10401764c27fb (patch) | |
tree | 2f33eb1355da1561a7d74b32806e21f08da73dc3 /models/user.go | |
parent | 2112eb87414fb0a08d77ad018ca306cfd15d5761 (diff) | |
download | gitea-985a39590ba07798dd6e6097e0c10401764c27fb.tar.gz gitea-985a39590ba07798dd6e6097e0c10401764c27fb.zip |
Use buffersize to reduce database connection when iterate (#2724)
* use buffersize to reduce database connection when iterate
* fix typo
* add default value on app.ini comment
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go index f0cdc74d05..835a775ebc 100644 --- a/models/user.go +++ b/models/user.go @@ -816,7 +816,7 @@ func ChangeUserName(u *User, newUserName string) (err error) { } // Delete all local copies of repository wiki that user owns. - if err = x. + if err = x.BufferSize(setting.IterateBufferSize). Where("owner_id=?", u.ID). Iterate(new(Repository), func(idx int, bean interface{}) error { repo := bean.(*Repository) |