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

fix(gatsby): move require out of hot function #36253

Merged
merged 5 commits into from
Jul 28, 2022
Merged

Conversation

KyleAMathews
Copy link
Contributor

@KyleAMathews KyleAMathews commented Jul 27, 2022

This require showed up in a performance profile as taking ~600ms (~5-10%) during a large query as resolveField is called a lot. We can memoize the require to avoid this.

This require showed up in a performance profile as taking ~600ms during a large query as `resolveField` is called a lot. We can require it out of the function to avoid this.
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 27, 2022
@KyleAMathews KyleAMathews added topic: performance Related to runtime & build performance and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jul 27, 2022
@gatsbyjs gatsbyjs deleted a comment from KyleAMathews Jul 27, 2022
@imjoshin
Copy link
Contributor

A lot more of the react_18 runtime tests are failing than normal. I'll poke around a bit. The code looks good though.

@imjoshin
Copy link
Contributor

A lot more of the react_18 runtime tests are failing than normal. I'll poke around a bit. The code looks good though.

Nevermind, just more than I remembered. 😂

@imjoshin imjoshin merged commit 32ad041 into master Jul 28, 2022
@imjoshin imjoshin deleted the KyleAMathews-patch-1 branch July 28, 2022 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: performance Related to runtime & build performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants