mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 20:08:49 +01:00
🎨 避免启动时重复全量重建索引 Fix https://github.com/siyuan-note/siyuan/issues/6950
This commit is contained in:
parent
99f16b2a7a
commit
40bbc6cc98
4 changed files with 7 additions and 7 deletions
|
|
@ -259,7 +259,7 @@ func IndexBlockTree(tree *parse.Tree) {
|
|||
|
||||
func AutoFlushBlockTree() {
|
||||
for {
|
||||
SaveBlockTree()
|
||||
SaveBlockTree(false)
|
||||
time.Sleep(7 * time.Second)
|
||||
}
|
||||
}
|
||||
|
|
@ -307,8 +307,8 @@ func InitBlockTree(force bool) {
|
|||
return
|
||||
}
|
||||
|
||||
func SaveBlockTree() {
|
||||
if !blockTreesChanged {
|
||||
func SaveBlockTree(force bool) {
|
||||
if !force && !blockTreesChanged {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue