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(graphql-server): Move yoga creation to avoid creation on every request #9039

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

Josh-Walker-GM
Copy link
Collaborator

Problem
v6 has seen some performance issues. These appear to have sneaked in on #8339. This just reverts the change by moving the creation of the yoga object so that it isn't created on every request.

Changes

  1. Moves yoga creation.

Outstanding

  1. We still have a tiny bit of work to do analysing a slight performance decline since 4.4.3

@Josh-Walker-GM Josh-Walker-GM added the release:fix This PR is a fix label Aug 14, 2023
@Josh-Walker-GM Josh-Walker-GM added this to the next-release-patch milestone Aug 14, 2023
Copy link
Contributor

@dthyresson dthyresson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

When I implemented the create Yoga refactor, I thought Yoga create and makeMergedSchema happened per request -- which it does.

However, my implementation didn't account for the way lambdas after cold start etc can be reused such that makeMergedSchema doesn't happen on each request handler.

My moving the creation into the handler I told it to makeMergedSchema every request handle -- every time -- regardless of lambda reuse.

Thus a large performance hit.

Many thanks to @Josh-Walker-GM for helping debug this as we stepped through changes.

@Josh-Walker-GM Josh-Walker-GM merged commit 85ae0b7 into main Aug 14, 2023
27 of 31 checks passed
@Josh-Walker-GM Josh-Walker-GM deleted the jgmw-graphql/move-yoga branch August 14, 2023 17:30
thedavidprice pushed a commit that referenced this pull request Aug 15, 2023
…quest (#9039)

**Problem**
v6 has seen some performance issues. These appear to have sneaked in on
#8339. This just reverts the change by moving the creation of the yoga
object so that it isn't created on every request.

**Changes**
1. Moves yoga creation.

**Outstanding**
1. We still have a tiny bit of work to do analysing a slight performance
decline since 4.4.3
thedavidprice pushed a commit that referenced this pull request Aug 17, 2023
…quest (#9039)

**Problem**
v6 has seen some performance issues. These appear to have sneaked in on
#8339. This just reverts the change by moving the creation of the yoga
object so that it isn't created on every request.

**Changes**
1. Moves yoga creation.

**Outstanding**
1. We still have a tiny bit of work to do analysing a slight performance
decline since 4.4.3
thedavidprice pushed a commit that referenced this pull request Aug 17, 2023
…quest (#9039)

**Problem**
v6 has seen some performance issues. These appear to have sneaked in on
#8339. This just reverts the change by moving the creation of the yoga
object so that it isn't created on every request.

**Changes**
1. Moves yoga creation.

**Outstanding**
1. We still have a tiny bit of work to do analysing a slight performance
decline since 4.4.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants