mirror of
https://github.com/alice-lg/alice-lg.git
synced 2024-05-11 05:55:03 +00:00
set more aggressive GC
This commit is contained in:
@ -7,6 +7,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"runtime/debug"
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -83,6 +84,9 @@ func main() {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tune garbage collection
|
||||||
|
debug.SetGCPercent(10)
|
||||||
|
|
||||||
// Setup local routes store and use backend from configuration
|
// Setup local routes store and use backend from configuration
|
||||||
var (
|
var (
|
||||||
neighborsBackend store.NeighborsStoreBackend = memory.NewNeighborsBackend()
|
neighborsBackend store.NeighborsStoreBackend = memory.NewNeighborsBackend()
|
||||||
|
Reference in New Issue
Block a user