Skip to content

Glob speed really slow #385

Answered by erikgeiser
mjmjelde asked this question in Q&A
Oct 19, 2021 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

Yep, my benchmarks show there is room for improvement:

goos: darwin
goarch: amd64
pkg: github.com/goreleaser/nfpm/v2/files
cpu: Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
BenchmarkExpandContentGlobs-4       	       1	8943350742 ns/op	5948665080 B/op	 2963056 allocs/op
BenchmarkExpandContentGlobsFast-4   	       2	 690795220 ns/op	503257972 B/op	 1260368 allocs/op
PASS
ok  	github.com/goreleaser/nfpm/v2/files	11.305s

I'll open an issue and submit a PR if I find some time to clean up my proof-of-concept.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@mjmjelde
Comment options

@erikgeiser
Comment options

@mjmjelde
Comment options

@erikgeiser
Comment options

Answer selected by mjmjelde
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants