mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 04:20:05 +08:00
⚡ Improve outline panel loading performance https://github.com/siyuan-note/siyuan/issues/12981
This commit is contained in:
parent
37fa059403
commit
56d7a3e2b8
@ -17,10 +17,8 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/88250/lute/html"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/88250/lute/ast"
|
"github.com/88250/lute/ast"
|
||||||
|
"github.com/88250/lute/html"
|
||||||
"github.com/88250/lute/parse"
|
"github.com/88250/lute/parse"
|
||||||
"github.com/emirpasic/gods/stacks/linkedliststack"
|
"github.com/emirpasic/gods/stacks/linkedliststack"
|
||||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||||
@ -209,7 +207,6 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Outline(rootID string, preview bool) (ret []*Path, err error) {
|
func Outline(rootID string, preview bool) (ret []*Path, err error) {
|
||||||
time.Sleep(util.FrontendQueueInterval)
|
|
||||||
FlushTxQueue()
|
FlushTxQueue()
|
||||||
|
|
||||||
ret = []*Path{}
|
ret = []*Path{}
|
||||||
|
@ -132,9 +132,6 @@ func SetNetworkProxy(proxyURL string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// FrontendQueueInterval 为前端请求队列轮询间隔。
|
|
||||||
FrontendQueueInterval = 512 * time.Millisecond
|
|
||||||
|
|
||||||
// SQLFlushInterval 为数据库事务队列写入间隔。
|
// SQLFlushInterval 为数据库事务队列写入间隔。
|
||||||
SQLFlushInterval = 3000 * time.Millisecond
|
SQLFlushInterval = 3000 * time.Millisecond
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user