mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-02-16 09:59:49 +03:00
refactor: 💡 optimizing GC
Setting debug.SetGCPercent makes golang free memory faster. This greatly improves overall RSS usage. Otherwise, golang prefers not to free memory at all:)
This commit is contained in:
parent
c2dacd32d1
commit
479675b6cc
1 changed files with 3 additions and 0 deletions
3
main.go
3
main.go
|
@ -1,6 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"runtime/debug"
|
||||
|
||||
"github.com/AdguardTeam/AdGuardHome/home"
|
||||
)
|
||||
|
||||
|
@ -11,5 +13,6 @@ var version = "undefined"
|
|||
var channel = "release"
|
||||
|
||||
func main() {
|
||||
debug.SetGCPercent(10)
|
||||
home.Main(version, channel)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue