🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113

This commit is contained in:
Liang Ding 2023-01-25 20:10:41 +08:00
parent 9b28cdfdf1
commit 3158ec97b3
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 5 additions and 2 deletions

View file

@ -1449,5 +1449,8 @@ func reindexTree0(tree *parse.Tree, i, size int) {
treenode.ReindexBlockTree(tree)
sql.IndexTreeQueue(tree.Box, tree.Path)
}
util.PushStatusBar(fmt.Sprintf(Conf.Language(183), i, size, html.EscapeHTMLStr(path.Base(tree.HPath))))
if 0 == i%64 {
util.PushStatusBar(fmt.Sprintf(Conf.Language(183), i, size, html.EscapeHTMLStr(path.Base(tree.HPath))))
}
}

View file

@ -366,7 +366,7 @@ func SaveBlockTree(force bool) {
}
start := time.Now()
if blockTreesChanged.Before(start.Add(7 * time.Second)) {
if blockTreesChanged.After(start.Add(-7 * time.Second)) {
return
}