[archiver] Try to configure runtime to limit resource consumption.

This commit is contained in:
Ciprian Dorin Craciun 2021-12-15 19:57:49 +02:00
parent 14183379b6
commit 16cd43ab8b

View file

@ -11,8 +11,10 @@ import "io"
import "io/ioutil" import "io/ioutil"
import "log" import "log"
import "net/http" import "net/http"
import "path/filepath"
import "os" import "os"
import "path/filepath"
import "runtime"
import "runtime/debug"
import "sort" import "sort"
import "strings" import "strings"
import "syscall" import "syscall"
@ -925,6 +927,11 @@ func walkPath (_context *context, _pathResolved string, _pathInArchive string, _
func Main () () { func Main () () {
runtime.GOMAXPROCS (2)
debug.SetGCPercent (75)
debug.SetMaxThreads (8)
Main_0 (main_0) Main_0 (main_0)
} }