♻️ Improve database loading performance https://github.com/siyuan-note/siyuan/issues/12818

This commit is contained in:
Daniel 2024-10-17 23:31:54 +08:00
parent da64370496
commit c42064ec0b
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
9 changed files with 77 additions and 79 deletions

View file

@ -97,7 +97,7 @@ func renderBlockText(node *ast.Node, excludeTypes []string) (ret string) {
return
}
ret = sql.NodeStaticContent(node, excludeTypes, false, false, false, GetBlockAttrsWithoutWaitWriting)
ret = sql.NodeStaticContent(node, excludeTypes, false, false, false)
ret = strings.TrimSpace(ret)
ret = strings.ReplaceAll(ret, "\n", "")
ret = util.EscapeHTML(ret)
@ -160,7 +160,7 @@ func renderBlockContentByNodes(nodes []*ast.Node) string {
buf := bytes.Buffer{}
for _, n := range subNodes {
buf.WriteString(sql.NodeStaticContent(n, nil, false, false, false, GetBlockAttrsWithoutWaitWriting))
buf.WriteString(sql.NodeStaticContent(n, nil, false, false, false))
}
return buf.String()
}