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
Overall improvement of the storefront 2.0 performances #3968
Overall improvement of the storefront 2.0 performances #3968
Conversation
2502725
to
4bb1c4d
Compare
There are bugs/issues around the optimizer library, so this PR will sadly (brings a lot of great optimizations) not be ready until the root of this issue is figured out. Hopefully I can dig more tomorrow around the troubles (relates to saleor/saleor-storefront#295). |
8c3f6f1
to
83d2b00
Compare
@auvipy please don't review drafts, that generating useless notifications on my side (thus making me lose precious time). Just leave a little 👍 reaction on the PR if you like it, that's enough to say you approve it! |
65be03c
to
810839a
Compare
I added Let me know what you think, or if you see a better approach to this matter. |
## During The Payment Capture - Prefetch order lines that then get proceeded; - Prefetch the user that will later get used to get the email address.
Prevention following this commit tfoxy/graphene-django-optimizer@1413773
1cf1a18
to
ace5fc9
Compare
Codecov Report
@@ Coverage Diff @@
## master #3968 +/- ##
==========================================
- Coverage 91.37% 91.32% -0.06%
==========================================
Files 274 274
Lines 14947 14950 +3
Branches 1451 1452 +1
==========================================
- Hits 13658 13653 -5
- Misses 898 904 +6
- Partials 391 393 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR looks good, but I'm only wondering about the from_global_id_strict_type
function. I'm not sure if this should be a part of BaseMutation
since it's only used in two places and is meant rather for specific use cases. I guess it should be a utility function somewhere in "saleor/graphql/core".
This fixes #3631.
Changes
Optimization of Single Nodes
This pull enables optimizations for single nodes. Which optimizes a lot of requests. See tfoxy/graphene-django-optimizer#18 for more information about this.
Overriding the Retrieval of a Single Node
Following the tfoxy/graphene-django-optimizer#18 changes, getting a single node whether optimized or not is now simpler. You should always call
maybe_optimize(info, qs, pk)
and not directly callget_optimized_node(info, qs, pk)
when overridingget_node(info, pk)
as it would result to issues when the node is not supposed to actually get optimized.This sums up of doing this:
During The Payment Capture
Comparison
Pull Request Checklist