We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a64787 commit b4d463fCopy full SHA for b4d463f
main.go
@@ -5,6 +5,8 @@ import (
5
"net"
6
"net/http"
7
_ "net/http/pprof"
8
+ "os"
9
+ "runtime"
10
11
"github.com/jackc/pgproto3/v2"
12
@@ -14,6 +16,16 @@ import (
14
16
)
15
17
18
func main() {
19
+ // Performance testing has shown almost a +70% performance boost
20
+ // for roundabout just by limiting GOMAXPROCS to 1.
21
+ //
22
+ // It is possible that it will perform better with more procs in
23
+ // certain environments, so we simply change the default here,
24
+ // but still respect any override placed in the environment.
25
+ if os.Getenv("GOMAXPROCS") == "" {
26
+ runtime.GOMAXPROCS(1)
27
+ }
28
+
29
log.SetFlags(log.LstdFlags | log.Lshortfile)
30
frontend.LaunchAll()
31
0 commit comments