mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
⚡ Improve database loading performance
This commit is contained in:
parent
2011ab84e5
commit
f69e776f8c
3 changed files with 37 additions and 13 deletions
|
|
@ -256,6 +256,8 @@ func (table *Table) FilterRows(attrView *AttributeView) {
|
|||
}
|
||||
|
||||
rows := []*TableRow{}
|
||||
attrViewCache := map[string]*AttributeView{}
|
||||
attrViewCache[attrView.ID] = attrView
|
||||
for _, row := range table.Rows {
|
||||
pass := true
|
||||
for j, index := range colIndexes {
|
||||
|
|
@ -275,7 +277,7 @@ func (table *Table) FilterRows(attrView *AttributeView) {
|
|||
break
|
||||
}
|
||||
|
||||
if !row.Cells[index].Value.Filter(table.Filters[j], attrView, row.ID) {
|
||||
if !row.Cells[index].Value.Filter(table.Filters[j], attrView, row.ID, &attrViewCache) {
|
||||
pass = false
|
||||
break
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue