Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance improvments #465

Merged
merged 3 commits into from
Dec 10, 2018
Merged

Performance improvments #465

merged 3 commits into from
Dec 10, 2018

Commits on Dec 8, 2018

  1. Add a benchmark

    go test -benchtime=5s -bench=. -benchmem
    goos: linux
    goarch: amd64
    pkg: github.com/99designs/gqlgen/example/starwars
    BenchmarkSimpleQueryNoArgs-8      200000             32680 ns/op            6357 B/op        126 allocs/op
    PASS
    ok      github.com/99designs/gqlgen/example/starwars    9.901s
    vektah committed Dec 8, 2018
    Configuration menu
    Copy the full SHA
    2cf5a5b View commit details
    Browse the repository at this point in the history
  2. Remove strconv.Quote call in hot path to avoid some allocs

    go test -benchtime=5s -bench=. -benchmem
    goos: linux
    goarch: amd64
    pkg: github.com/99designs/gqlgen/example/starwars
    BenchmarkSimpleQueryNoArgs-8      200000             32125 ns/op            6277 B/op        118 allocs/op
    PASS
    ok      github.com/99designs/gqlgen/example/starwars    9.768s
    vektah committed Dec 8, 2018
    Configuration menu
    Copy the full SHA
    b0ffa22 View commit details
    Browse the repository at this point in the history
  3. Avoid unnessicary goroutines

    goos: linux
    goarch: amd64
    pkg: github.com/99designs/gqlgen/example/starwars
    BenchmarkSimpleQueryNoArgs-8      300000             25093 ns/op            6453 B/op        114 allocs/op
    PASS
    ok      github.com/99designs/gqlgen/example/starwars    10.807s
    vektah committed Dec 8, 2018
    Configuration menu
    Copy the full SHA
    5c8b1e2 View commit details
    Browse the repository at this point in the history