改进数据量较大时的启动速度 https://github.com/siyuan-note/siyuan/issues/6574

This commit is contained in:
Liang Ding 2022-11-14 11:05:42 +08:00
parent b3c9eba73a
commit cdf2b79678
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 39 additions and 8 deletions

View file

@ -25,7 +25,6 @@ import (
"github.com/88250/gulu"
"github.com/denisbrodbeck/machineid"
"github.com/dustin/go-humanize"
"github.com/siyuan-note/logging"
)
@ -41,9 +40,6 @@ const (
)
func logBootInfo() {
s, _ := SizeOfDirectory(DataDir)
dataDirSize := humanize.Bytes(uint64(s))
logging.LogInfof("kernel is booting:\n"+
" * ver [%s]\n"+
" * arch [%s]\n"+
@ -53,8 +49,8 @@ func logBootInfo() {
" * read only [%v]\n"+
" * container [%s]\n"+
" * database [ver=%s]\n"+
" * workspace directory [%s, data %s]",
Ver, runtime.GOARCH, os.Getpid(), Mode, WorkingDir, ReadOnly, Container, DatabaseVer, WorkspaceDir, dataDirSize)
" * workspace directory [%s]",
Ver, runtime.GOARCH, os.Getpid(), Mode, WorkingDir, ReadOnly, Container, DatabaseVer, WorkspaceDir)
}
func IsMutexLocked(m *sync.Mutex) bool {