Open adberger opened 1 month ago
Hi there
I've made a few changes, the biggest one being the matchPattern function which should make spruce much faster especially when rendering larges files.
matchPattern
If you are open to a review (& possible merge), I ask you to do it thoroughly as I don't have much experience with Go.
Here is a benchmark comparsion from our tool, which uses spruce under the hood:
Before:
BenchmarkExecute-12 1 8906495459 ns/op 65408706864 B/op 679075642 allocs/op PASS ok github.com/bedag/subst/subst/cmd 9.524s
After:
BenchmarkExecute-12 1 1447321000 ns/op 1864258368 B/op 20667868 allocs/op PASS ok github.com/bedag/subst/subst/cmd 2.065s
Memory consumption went down from ~60GB to ~1GB, so much less garbage collection.
@geofffranks Do you consider reviewing & merging this? :)
Hi there
I've made a few changes, the biggest one being the
matchPattern
function which should make spruce much faster especially when rendering larges files.If you are open to a review (& possible merge), I ask you to do it thoroughly as I don't have much experience with Go.
Here is a benchmark comparsion from our tool, which uses spruce under the hood:
Before:
After:
Memory consumption went down from ~60GB to ~1GB, so much less garbage collection.