Skip to content

Commit

Permalink
perf: normal files do not do atomic operations
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed Jul 4, 2023
1 parent 17e4331 commit 0bf9984
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 102 deletions.
2 changes: 1 addition & 1 deletion bench.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
const { getFolderSizeWithIpc, close } =
createGetFolderSizeBinIpc()

const base = './'
const base = '../'

const nodeStartTime = Date.now()
const nodeResult = await getFolderSize(base, true)
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/markthree/go-get-folder-size
go 1.20

require (
github.com/panjf2000/ants/v2 v2.7.1
github.com/stretchr/testify v1.8.1
github.com/panjf2000/ants/v2 v2.8.0
github.com/stretchr/testify v1.8.4
)

require (
Expand Down
7 changes: 4 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/panjf2000/ants/v2 v2.7.1 h1:qBy5lfSdbxvrR0yUnZfaEDjf0FlCw4ufsbcsxmE7r+M=
github.com/panjf2000/ants/v2 v2.7.1/go.mod h1:KIBmYG9QQX5U2qzFP/yQJaq/nSb6rahS9iEHkrCMgM8=
github.com/panjf2000/ants/v2 v2.8.0 h1:4p4gPabD6iNM9Y5NpMc0g0L15uXDmfn6jkW5KP+oiHQ=
github.com/panjf2000/ants/v2 v2.8.0/go.mod h1:KIBmYG9QQX5U2qzFP/yQJaq/nSb6rahS9iEHkrCMgM8=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"prepublishOnly": "pnpm build",
"release": "bumpp --push --tag --all && npm publish",
"build-go-bin": "goreleaser release --snapshot --clean",
"build": "rimraf -rf npm && run-p build-go-wasm build-go-bin && run-p build-ts build-types",
"build": "rimraf -rf npm dist && run-p build-go-wasm build-go-bin && run-p build-ts build-types",
"build-go-wasm": "cross-env GOOS=js GOARCH=wasm go build -o ./wasm/main.wasm ./wasm/main.go",
"postinstall": "node scripts/post.mjs"
},
Expand All @@ -54,16 +54,16 @@
},
"license": "MIT",
"devDependencies": {
"@types/node": "^18.16.9",
"bumpp": "^9.1.0",
"@types/node": "^18.16.19",
"bumpp": "^9.1.1",
"cross-env": "^7.0.3",
"execa": "^7.1.1",
"mri": "^1.2.0",
"npm-run-all": "^4.1.5",
"pretty-bytes": "^6.1.0",
"rimraf": "^5.0.0",
"rimraf": "^5.0.1",
"specifier-backward": "^0.0.4",
"typescript": "^5.0.4",
"vite": "^4.3.5"
"typescript": "^5.1.6",
"vite": "^4.3.9"
}
}
Loading

0 comments on commit 0bf9984

Please sign in to comment.