From 24dbb7c092dd1b734657258ccc66df55330348d4 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 14 Dec 2022 22:55:23 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E6=94=B9=E8=BF=9B=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BF=AB=E7=85=A7=E5=8A=A0=E8=BD=BD=E6=80=A7=E8=83=BD=20https:?= =?UTF-8?q?//github.com/siyuan-note/siyuan/issues/6872?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/repository.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kernel/model/repository.go b/kernel/model/repository.go index 315cbc1fd..4a6b375c1 100644 --- a/kernel/model/repository.go +++ b/kernel/model/repository.go @@ -76,7 +76,7 @@ func GetRepoSnapshots(page int) (ret []*Snapshot, pageCount, totalCount int, err return } - logs, pageCount, totalCount, err := repo.GetIndexLogs(page, 16) + logs, pageCount, totalCount, err := repo.GetIndexLogs(page, 32) if nil != err { if dejavu.ErrNotFoundIndex == err { logs = []*dejavu.Log{} @@ -98,6 +98,7 @@ func GetRepoSnapshots(page int) (ret []*Snapshot, pageCount, totalCount int, err func buildSnapshots(logs []*dejavu.Log) (ret []*Snapshot) { for _, l := range logs { typesCount := statTypesByPath(l.Files) + l.Files = nil // 置空,否则返回前端数据量太大 ret = append(ret, &Snapshot{ Log: l, TypesCount: typesCount, @@ -936,7 +937,7 @@ func subscribeEvents() { indexWalkDataCount := 0 eventbus.Subscribe(eventbus.EvtIndexWalkData, func(context map[string]interface{}, path string) { msg := fmt.Sprintf(Conf.Language(158), filepath.Base(path)) - if 0 == indexWalkDataCount%512 { + if 0 == indexWalkDataCount%1024 { util.SetBootDetails(msg) util.ContextPushMsg(context, msg) } @@ -950,7 +951,7 @@ func subscribeEvents() { getLatestFileCount := 0 eventbus.Subscribe(eventbus.EvtIndexGetLatestFile, func(context map[string]interface{}, id string) { msg := fmt.Sprintf(Conf.Language(159), id[:7]) - if 0 == getLatestFileCount%512 { + if 0 == getLatestFileCount%1024 { util.SetBootDetails(msg) util.ContextPushMsg(context, msg) } @@ -979,7 +980,7 @@ func subscribeEvents() { coWalkDataCount := 0 eventbus.Subscribe(eventbus.EvtCheckoutWalkData, func(context map[string]interface{}, path string) { msg := fmt.Sprintf(Conf.Language(161), filepath.Base(path)) - if 0 == coWalkDataCount%512 { + if 0 == coWalkDataCount%1024 { util.SetBootDetails(msg) util.ContextPushMsg(context, msg) } @@ -1011,7 +1012,7 @@ func subscribeEvents() { eventbus.Subscribe(eventbus.EvtCheckoutRemoveFile, func(context map[string]interface{}, path string) { msg := fmt.Sprintf(Conf.Language(163), filepath.Base(path)) util.IncBootProgress(bootProgressPart, msg) - if 0 == coRemoveFileCount%512 { + if 0 == coRemoveFileCount%1024 { util.ContextPushMsg(context, msg) } coRemoveFileCount++