mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
⚡ Improve database loading performance
This commit is contained in:
parent
2011ab84e5
commit
f69e776f8c
3 changed files with 37 additions and 13 deletions
|
|
@ -79,7 +79,7 @@ const (
|
|||
FilterOperatorIsFalse FilterOperator = "Is false"
|
||||
)
|
||||
|
||||
func (value *Value) Filter(filter *ViewFilter, attrView *AttributeView, rowID string) bool {
|
||||
func (value *Value) Filter(filter *ViewFilter, attrView *AttributeView, rowID string, attrViewCache *map[string]*AttributeView) bool {
|
||||
if nil == filter || (nil == filter.Value && nil == filter.RelativeDate) {
|
||||
return true
|
||||
}
|
||||
|
|
@ -117,7 +117,13 @@ func (value *Value) Filter(filter *ViewFilter, attrView *AttributeView, rowID st
|
|||
return false
|
||||
}
|
||||
|
||||
destAv, _ := ParseAttributeView(relKey.Relation.AvID)
|
||||
destAv := (*attrViewCache)[relKey.Relation.AvID]
|
||||
if nil == destAv {
|
||||
destAv, _ = ParseAttributeView(relKey.Relation.AvID)
|
||||
if nil != destAv {
|
||||
(*attrViewCache)[relKey.Relation.AvID] = destAv
|
||||
}
|
||||
}
|
||||
if nil == destAv {
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue