소스 검색

:zap: Improve outline panel loading performance https://github.com/siyuan-note/siyuan/issues/12981

Daniel 8 달 전
부모
커밋
56d7a3e2b8
2개의 변경된 파일1개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 4
      kernel/model/outline.go
  2. 0 3
      kernel/util/runtime.go

+ 1 - 4
kernel/model/outline.go

@@ -17,10 +17,8 @@
 package model
 
 import (
-	"github.com/88250/lute/html"
-	"time"
-
 	"github.com/88250/lute/ast"
+	"github.com/88250/lute/html"
 	"github.com/88250/lute/parse"
 	"github.com/emirpasic/gods/stacks/linkedliststack"
 	"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) {
-	time.Sleep(util.FrontendQueueInterval)
 	FlushTxQueue()
 
 	ret = []*Path{}

+ 0 - 3
kernel/util/runtime.go

@@ -132,9 +132,6 @@ func SetNetworkProxy(proxyURL string) {
 }
 
 const (
-	// FrontendQueueInterval 为前端请求队列轮询间隔。
-	FrontendQueueInterval = 512 * time.Millisecond
-
 	// SQLFlushInterval 为数据库事务队列写入间隔。
 	SQLFlushInterval = 3000 * time.Millisecond
 )