Closed ebarped closed 2 years ago
This has been changed lately in https://github.com/inCaller/prometheus_bot/pull/81 by @skillcoder.
Maybe they have some insight about this?
GOGC=off
in go build
just to speed up building process. It's not affected runtime, just disable GC for compiler during compilation.
It's not related to heap allocations in prometheus_bot.
Just wondering why the Dockerfile compiles the code disabling go garbage collector? There is no explanation of this decision...
Besides, executing a build that prints the escape analysis returns a lot of heap allocations:
Command:
go build -gcflags="-m" main.go 2>&1 | grep "escapes to heap"
Result: