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

Features/1.10 ready #1

Merged
merged 2 commits into from
Aug 26, 2020
Merged

Features/1.10 ready #1

merged 2 commits into from
Aug 26, 2020

Conversation

rkorzeniec
Copy link

@rkorzeniec rkorzeniec commented Aug 18, 2020

This PR should (tested on the main app) make the graphql-preload gem ready for the new AST interpreter.

Changes in this PR are heavily based on ConsultingMD#25, with few minor changes, by making it more modular and properly using the options hash for field extensions.

The branch on the main app is updates/graphql-1.10.
The page I tested the preloading on http://localhost:3001/en-ch/explore/womens
You can compare using the original gem (or pointing to master) of this fork and pointing to this branch. The amount of DB calls and N+1s drops severely.

P.S. - also one day we might be forced to do this one too... ConsultingMD#32

@rkorzeniec rkorzeniec requested a review from severin August 18, 2020 18:15
@rkorzeniec
Copy link
Author

rkorzeniec commented Aug 18, 2020

@severin I'd need help adding this project to codeship, no permissions for that again 😉 while at it, any chance you could add the graphql-result_cache gem also, I'd like to set it up there too.

Copy link

@severin severin left a comment

Choose a reason for hiding this comment

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

@rkorzeniec I tested the following combinations:

  • main app master branch: 24s for the query, thereof 90ms database time, no N+1 queries in the logs ✅
  • main app updates/graphql-1.10 branch using this repo's master: 29s for the query, thereof 3+s database time, lots of N+1 queries ⛔
  • main app updates/graphql-1.10 branch using this PR's branch: 22s for the query, 90ms database time, no N+1 queries ✅

I quickly skimmed the code but did not thoroughly review it. If you wish me to do that please rerequest review.

@rkorzeniec rkorzeniec merged commit d1a6eb8 into master Aug 26, 2020
@rkorzeniec rkorzeniec deleted the features/1.10-ready branch August 28, 2020 10:28
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