🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
parent
e214543c86
commit
81df07598d
1 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@ package treenode
|
|||
import (
|
||||
"io"
|
||||
"os"
|
||||
"runtime/debug"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
@ -353,7 +353,7 @@ func InitBlockTree(force bool) {
|
|||
return
|
||||
}
|
||||
blockTreesLock.Unlock()
|
||||
debug.FreeOSMemory()
|
||||
runtime.GC()
|
||||
|
||||
if elapsed := time.Since(start).Seconds(); 2 < elapsed {
|
||||
logging.LogWarnf("read block tree [%s] to [%s], elapsed [%.2fs]", humanize.Bytes(uint64(len(data))), util.BlockTreePath, elapsed)
|
||||
|
@ -385,7 +385,7 @@ func SaveBlockTree(force bool) {
|
|||
os.Exit(util.ExitCodeBlockTreeErr)
|
||||
return
|
||||
}
|
||||
debug.FreeOSMemory()
|
||||
runtime.GC()
|
||||
|
||||
if elapsed := time.Since(start).Seconds(); 2 < elapsed {
|
||||
logging.LogWarnf("save block tree [size=%s] to [%s], elapsed [%.2fs]", humanize.Bytes(uint64(len(data))), util.BlockTreePath, elapsed)
|
||||
|
|
Loading…
Add table
Reference in a new issue