mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Improve database performance https://github.com/siyuan-note/siyuan/issues/15764
This commit is contained in:
parent
cd8c3a41e6
commit
2b85cb1b6c
4 changed files with 21 additions and 10 deletions
|
|
@ -74,11 +74,12 @@ func RenderView(attrView *av.AttributeView, view *av.View, query string) (ret av
|
|||
renderedAttrViews := map[string]*av.AttributeView{}
|
||||
renderedAttrViews[attrView.ID] = attrView
|
||||
ret = renderView(attrView, view, query, &depth, renderedAttrViews)
|
||||
|
||||
attrView.RenderedViewables[ret.GetID()] = ret
|
||||
return
|
||||
}
|
||||
|
||||
func renderView(attrView *av.AttributeView, view *av.View, query string,
|
||||
depth *int, cachedAttrViews map[string]*av.AttributeView) (ret av.Viewable) {
|
||||
func renderView(attrView *av.AttributeView, view *av.View, query string, depth *int, cachedAttrViews map[string]*av.AttributeView) (ret av.Viewable) {
|
||||
if 7 < *depth {
|
||||
return
|
||||
}
|
||||
|
|
@ -334,9 +335,7 @@ func fillAttributeViewBaseValue(baseValue *av.BaseValue, fieldID, itemID string,
|
|||
}
|
||||
}
|
||||
|
||||
func fillAttributeViewAutoGeneratedValues(attrView *av.AttributeView, collection av.Collection, ials map[string]map[string]string,
|
||||
depth *int, cachedAttrViews map[string]*av.AttributeView) {
|
||||
|
||||
func fillAttributeViewAutoGeneratedValues(attrView *av.AttributeView, collection av.Collection, ials map[string]map[string]string, depth *int, cachedAttrViews map[string]*av.AttributeView) {
|
||||
// 先渲染主键、创建时间、更新时间
|
||||
|
||||
for _, item := range collection.GetItems() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue