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

Gnerate to fast by exec codegen.GenerateCode before plugin GenerateCode #1100

Merged
merged 1 commit into from
Mar 12, 2020

Conversation

sonatard
Copy link
Contributor

I fixed to only called once during generation in #1079 but it slowed down generation.
I found to fast by exec codegen.GenerateCode before plugin GenerateCode.

Benchmark in my code.

// v0.11.2
$ time gqlgen generate
gqlgen generate  20.41s user 15.53s system 30% cpu 1:59.05 total

// this PR
$ time gqlgen generate
gqlgen generate  6.15s user 4.54s system 383% cpu 2.791 total

I don't know why...

@sonatard sonatard changed the title Exec codegen.GenerateCode before plugin GenerateCode to fast gnerate to fast by exec codegen.GenerateCode before plugin GenerateCode Mar 12, 2020
@sonatard sonatard changed the title gnerate to fast by exec codegen.GenerateCode before plugin GenerateCode Gnerate to fast by exec codegen.GenerateCode before plugin GenerateCode Mar 12, 2020
@vektah
Copy link
Collaborator

vektah commented Mar 12, 2020

Ok, lets revert until we figure it out

@vektah vektah merged commit 793b067 into 99designs:master Mar 12, 2020
@sonatard sonatard deleted the fast branch March 19, 2022 12:25
cgxxv pushed a commit to cgxxv/gqlgen that referenced this pull request Mar 25, 2022
Gnerate to fast by exec codegen.GenerateCode before plugin GenerateCode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants