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

This commit is contained in:
Daniel 2024-10-17 23:44:55 +08:00
parent c42064ec0b
commit 95c82187af
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 33 additions and 53 deletions

View file

@ -22,6 +22,7 @@ import (
"github.com/88250/gulu"
"github.com/gin-gonic/gin"
"github.com/siyuan-note/siyuan/kernel/model"
"github.com/siyuan-note/siyuan/kernel/sql"
"github.com/siyuan-note/siyuan/kernel/treenode"
"github.com/siyuan-note/siyuan/kernel/util"
)
@ -48,7 +49,7 @@ func batchGetBlockAttrs(c *gin.Context) {
idList = append(idList, id.(string))
}
ret.Data = model.BatchGetBlockAttrs(idList)
ret.Data = sql.BatchGetBlockAttrs(idList)
}
func getBlockAttrs(c *gin.Context) {
@ -65,7 +66,7 @@ func getBlockAttrs(c *gin.Context) {
return
}
ret.Data = model.GetBlockAttrs(id)
ret.Data = sql.GetBlockAttrs(id)
}
func setBlockAttrs(c *gin.Context) {