Improve block ref searching performance https://github.com/siyuan-note/siyuan/issues/11951

This commit is contained in:
Daniel 2024-07-14 11:44:13 +08:00
parent f32b879a08
commit 27f88c2482
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 12 additions and 2 deletions

View file

@ -212,6 +212,11 @@ func LoadTreeByBlockID(id string) (ret *parse.Tree, err error) {
return nil, ErrTreeNotFound
}
ret, err = loadTreeByBlockTree(bt)
return
}
func loadTreeByBlockTree(bt *treenode.BlockTree) (ret *parse.Tree, err error) {
luteEngine := util.NewLute()
ret, err = filesys.LoadTree(bt.BoxID, bt.Path, luteEngine)
return