mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 内核垃圾回收
This commit is contained in:
parent
eea6c9468a
commit
74e7ecd5a5
8 changed files with 17 additions and 13 deletions
|
|
@ -21,6 +21,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
|
@ -380,7 +381,7 @@ func InitBlockTree(force bool) {
|
|||
waitGroup.Wait()
|
||||
p.Release()
|
||||
|
||||
runtime.GC()
|
||||
debug.FreeOSMemory()
|
||||
elapsed := time.Since(start).Seconds()
|
||||
logging.LogInfof("read block tree [%s] to [%s], elapsed [%.2fs]", humanize.Bytes((size)), util.BlockTreePath, elapsed)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue