mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 15:28:49 +01:00
⚡ 改进创建文档性能 Fix https://github.com/siyuan-note/siyuan/issues/7175
This commit is contained in:
parent
258acc1142
commit
a3940c220f
5 changed files with 25 additions and 30 deletions
|
|
@ -61,8 +61,6 @@ func IsUnfoldHeading(transactions *[]*Transaction) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
const txFixDelay = 10
|
||||
|
||||
var (
|
||||
txQueue []*Transaction
|
||||
txQueueLock = sync.Mutex{}
|
||||
|
|
@ -87,7 +85,7 @@ func WaitForWritingFiles() {
|
|||
}
|
||||
|
||||
func isWritingFiles() bool {
|
||||
time.Sleep(time.Duration(txFixDelay+10) * time.Millisecond)
|
||||
time.Sleep(time.Duration(20) * time.Millisecond)
|
||||
if 0 < len(txQueue) || util.IsMutexLocked(&txQueueLock) {
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue