mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 03:10:16 +01:00
🎨 内核垃圾回收
This commit is contained in:
parent
eea6c9468a
commit
74e7ecd5a5
8 changed files with 17 additions and 13 deletions
|
|
@ -19,6 +19,7 @@ package model
|
|||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
|
@ -125,7 +126,7 @@ func index(boxID string) {
|
|||
end := time.Now()
|
||||
elapsed := end.Sub(start).Seconds()
|
||||
logging.LogInfof("rebuilt database for notebook [%s] in [%.2fs], tree [count=%d, size=%s]", box.ID, elapsed, treeCount, humanize.Bytes(uint64(treeSize)))
|
||||
runtime.GC()
|
||||
debug.FreeOSMemory()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue