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

This commit is contained in:
Liang Ding 2023-01-26 12:34:57 +08:00
parent 10407d54d6
commit db777afc25
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 279 additions and 242 deletions

View file

@ -25,6 +25,7 @@ import (
"os"
"path"
"path/filepath"
"runtime"
"sort"
"strings"
"sync"
@ -516,12 +517,15 @@ func fullReindex() {
}
treenode.InitBlockTree(true)
sql.DisableCache()
openedBoxes := Conf.GetOpenedBoxes()
for _, openedBox := range openedBoxes {
index(openedBox.ID)
}
sql.EnableCache()
treenode.SaveBlockTree(true)
LoadFlashcards()
runtime.GC()
}
func ChangeBoxSort(boxIDs []string) {