From 56d7a3e2b879f562223e1cf264c60b34aedbd916 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 31 Oct 2024 22:39:33 +0800 Subject: [PATCH] :zap: Improve outline panel loading performance https://github.com/siyuan-note/siyuan/issues/12981 --- kernel/model/outline.go | 5 +---- kernel/util/runtime.go | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/kernel/model/outline.go b/kernel/model/outline.go index 5e45b1f34..4e819d511 100644 --- a/kernel/model/outline.go +++ b/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{} diff --git a/kernel/util/runtime.go b/kernel/util/runtime.go index 30adbea1e..4182d7042 100644 --- a/kernel/util/runtime.go +++ b/kernel/util/runtime.go @@ -132,9 +132,6 @@ func SetNetworkProxy(proxyURL string) { } const ( - // FrontendQueueInterval 为前端请求队列轮询间隔。 - FrontendQueueInterval = 512 * time.Millisecond - // SQLFlushInterval 为数据库事务队列写入间隔。 SQLFlushInterval = 3000 * time.Millisecond )