|
@@ -324,10 +324,15 @@ func SearchRefBlock(id, rootID, keyword string, beforeLen int, isSquareBrackets,
|
|
|
|
|
|
ignoreLines := getRefSearchIgnoreLines()
|
|
|
refs := sql.QueryRefsRecent(onlyDoc, ignoreLines)
|
|
|
+ var btsID []string
|
|
|
+ for _, ref := range refs {
|
|
|
+ btsID = append(btsID, ref.DefBlockRootID)
|
|
|
+ }
|
|
|
+ bts := treenode.GetBlockTrees(btsID)
|
|
|
for _, ref := range refs {
|
|
|
tree := cachedTrees[ref.DefBlockRootID]
|
|
|
if nil == tree {
|
|
|
- tree, _ = LoadTreeByBlockID(ref.DefBlockRootID)
|
|
|
+ tree, _ = loadTreeByBlockTree(bts[ref.DefBlockRootID])
|
|
|
}
|
|
|
if nil == tree {
|
|
|
continue
|