Generate performance: takes 8 minutes, ~12GB of RAM #2792
Unanswered
geertjanvdk
asked this question in
Q&A
Replies: 1 comment 6 replies
-
I just tested on Macbook Pro M2 with 32 gb of ram on large production project with about 4400 lines of schema. bash-3.2$ go version
go version go1.21.0 darwin/arm64
bash-3.2$
bash-3.2$ time go run github.com/99designs/gqlgen --config gqlgen.yml generate
time go run github.com/99designs/gqlgen --config gqlgen.yml generate 17.74s user 5.16s system 265% cpu 8.635 total generate took ~18s |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am facing an issue with a medium schema size (about 1200 line; no comments/help; fields on each line), and it takes around 8 minutes to generate. My MacBook Air M2 has 16GB, and I need to shutdown lots to get gqlgen to save a few minutes (would be around 6 minutes).
Monitoring the process it is taking about 12GB. I have 23 direct dependencies.
4 months ago, it was 4 minutes. It's not like the schema gets that bigger all of sudden, but any change adds quite a bit of time..
Any great tools or examples on how to debug this? Any buttons I can turn to tell it to not look too far for things?
The excesive use of RAM is.. quite a thing, no?
(private project; cannot share, but bits I could if needed)
Adding a few timers, I get weird things like:
I cannot explain these 2/3 seconds for some or most resolvers. Also, adding those up would not get 8 minutes. Digging more..
Similar as bug #918
Beta Was this translation helpful? Give feedback.
All reactions