-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
What happened?
The transport.Post implementation in the Do method has potential for optimization. Specifically, two areas could improve performance:
- The
Domethod frequently converts[]bytetostring, which incurs additional allocations. graphql.RawParamscould benefit from async.Poolto reduce allocations and reuse memory.
What did you expect?
Optimizing memory allocation in the Do method should lead to better overall performance for the gqlgen server, especially for high-throughput applications.
Minimal graphql.schema and models to reproduce
I tested using the gqlgen initial schema and an empty slice return for the Todos query, observing allocation patterns during benchmarking.
Versions
- gqlgen version:
v0.17.55(viago run github.com/99designs/gqlgen version) - Go version:
go1.23.2 darwin/amd64