🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113

This commit is contained in:
Liang Ding 2023-01-26 13:52:22 +08:00
parent 5aff312a7b
commit e214543c86
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 3 additions and 4 deletions

View file

@ -31,7 +31,7 @@ import (
"os"
"path"
"path/filepath"
"runtime/debug"
"runtime"
"sort"
"strconv"
"strings"
@ -708,8 +708,9 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
}
IncSync()
}
debug.FreeOSMemory()
IncSync()
runtime.GC()
return
}

View file

@ -21,7 +21,6 @@ import (
"fmt"
"os"
"path/filepath"
"runtime/debug"
"strings"
"time"
"unicode/utf8"
@ -132,7 +131,6 @@ func unmount0(boxID string) {
boxConf.Closed = true
box.SaveConf(boxConf)
box.Unindex()
debug.FreeOSMemory()
}
func Mount(boxID string) (alreadyMount bool, err error) {