mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
⚡ Improve performance for rendering databases, due flashcards
This commit is contained in:
parent
65f24b376e
commit
06f3721fd4
6 changed files with 36 additions and 7 deletions
|
|
@ -111,6 +111,7 @@ func RenderAttributeViewTable(attrView *av.AttributeView, view *av.View, query s
|
|||
|
||||
// 过滤掉不存在的行
|
||||
var notFound []string
|
||||
var toCheckBlockIDs []string
|
||||
for blockID, keyValues := range rows {
|
||||
blockValue := getRowBlockValue(keyValues)
|
||||
if nil == blockValue {
|
||||
|
|
@ -127,7 +128,11 @@ func RenderAttributeViewTable(attrView *av.AttributeView, view *av.View, query s
|
|||
continue
|
||||
}
|
||||
|
||||
if nil == treenode.GetBlockTree(blockID) {
|
||||
toCheckBlockIDs = append(toCheckBlockIDs, blockID)
|
||||
}
|
||||
checkRet := treenode.ExistBlockTrees(toCheckBlockIDs)
|
||||
for blockID, exist := range checkRet {
|
||||
if !exist {
|
||||
notFound = append(notFound, blockID)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue