mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
parent
801bc69820
commit
7e014cb525
7 changed files with 27 additions and 15 deletions
|
|
@ -292,16 +292,16 @@ func ReindexBlockTree(tree *parse.Tree) {
|
|||
blockTreesLock.Lock()
|
||||
defer blockTreesLock.Unlock()
|
||||
|
||||
var ids []string
|
||||
for _, b := range blockTrees {
|
||||
if b.RootID == tree.ID {
|
||||
ids = append(ids, b.ID)
|
||||
}
|
||||
}
|
||||
ids = gulu.Str.RemoveDuplicatedElem(ids)
|
||||
for _, id := range ids {
|
||||
delete(blockTrees, id)
|
||||
}
|
||||
//var ids []string
|
||||
//for _, b := range blockTrees {
|
||||
// if b.RootID == tree.ID {
|
||||
// ids = append(ids, b.ID)
|
||||
// }
|
||||
//}
|
||||
//ids = gulu.Str.RemoveDuplicatedElem(ids)
|
||||
//for _, id := range ids {
|
||||
// delete(blockTrees, id)
|
||||
//}
|
||||
|
||||
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
if !entering || !n.IsBlock() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue