🎨 Improve init block tree

This commit is contained in:
Daniel 2023-06-19 11:12:19 +08:00
parent 3d79a903d1
commit 3e06c5db2a
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 3 additions and 7 deletions

View file

@ -45,7 +45,7 @@ require (
github.com/radovskyb/watcher v1.0.7
github.com/sashabaranov/go-openai v1.9.5
github.com/shirou/gopsutil/v3 v3.23.5
github.com/siyuan-note/dejavu v0.0.0-20230618092943-fe33c41abaa1
github.com/siyuan-note/dejavu v0.0.0-20230619030559-5961f5305454
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75
github.com/siyuan-note/eventbus v0.0.0-20230216103454-41885eac6c2b
github.com/siyuan-note/filelock v0.0.0-20230615140405-d05a21d49524

View file

@ -287,10 +287,8 @@ github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5g
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA=
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=
github.com/siyuan-note/dejavu v0.0.0-20230618031119-aeed7720d9d2 h1:kDKHzaEh9vFd2sedr3Aax20BcExVQ7rGA4XFKvW7F5E=
github.com/siyuan-note/dejavu v0.0.0-20230618031119-aeed7720d9d2/go.mod h1:jdDdFYod0VEjslXFDpSge1WNIUSzdv5WYIoOVQFF/SE=
github.com/siyuan-note/dejavu v0.0.0-20230618092943-fe33c41abaa1 h1:bqcXKbUXxoY7ggBGjvjFBI/Xbqervx4HYaVLEnRg6jk=
github.com/siyuan-note/dejavu v0.0.0-20230618092943-fe33c41abaa1/go.mod h1:nvz7SnKTGUJ4bGjTx65rzEMdOrD0kZmRMZ6Bjv6Lj1Y=
github.com/siyuan-note/dejavu v0.0.0-20230619030559-5961f5305454 h1:d5etRsdJvV5DbGSbelJ0ZZH0eFHcKQliE0TgrNc2ngU=
github.com/siyuan-note/dejavu v0.0.0-20230619030559-5961f5305454/go.mod h1:nvz7SnKTGUJ4bGjTx65rzEMdOrD0kZmRMZ6Bjv6Lj1Y=
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 h1:Bi7/7f29LW+Fm0cHc0J1NO1cZqyJwljSWVmfOqVZgaE=
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw=
github.com/siyuan-note/eventbus v0.0.0-20230216103454-41885eac6c2b h1:828lTUW2C0uNiolODqoACu7J8sDUzswD4Xo04mUombg=

View file

@ -19,7 +19,6 @@ package treenode
import (
"os"
"path/filepath"
"runtime/debug"
"strings"
"sync"
"time"
@ -443,7 +442,6 @@ func InitBlockTree(force bool) {
waitGroup.Wait()
p.Release()
debug.FreeOSMemory()
elapsed := time.Since(start).Seconds()
logging.LogInfof("read block tree [%s] to [%s], elapsed [%.2fs]", humanize.Bytes(uint64(size)), util.BlockTreePath, elapsed)
return