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(medusa): Performance improvement for variant availability #3921

Merged

Conversation

pKorsholm
Copy link
Contributor

@pKorsholm pKorsholm commented Apr 25, 2023

What

  • refactor availability invocations to only do one call to the inventory module

@adrien2p would love to run through some tests of this with you and get your take on approach

@vercel
Copy link

vercel bot commented Apr 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 3, 2023 9:14am

@changeset-bot
Copy link

changeset-bot bot commented Apr 25, 2023

🦋 Changeset detected

Latest commit: caac43a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@medusajs/medusa Patch
@medusajs/admin-ui Patch
@medusajs/admin Patch
@medusajs/medusa-js Patch
medusa-payment-paypal Patch
medusa-payment-stripe Patch
medusa-plugin-restock-notification Patch
medusa-react Patch
@medusajs/medusa-oas-cli Patch
@medusajs/oas-github-ci Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pKorsholm pKorsholm marked this pull request as ready for review April 25, 2023 12:59
@pKorsholm pKorsholm requested a review from a team as a code owner April 25, 2023 12:59
@olivermrbl olivermrbl changed the title Fix/performance improvement for variant availability fix(medusa): Performance improvement for variant availability May 1, 2023
olivermrbl
olivermrbl previously approved these changes May 1, 2023
Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

LGTM!

@pKorsholm
Copy link
Contributor Author

@olivermrbl would love to have a talk w/ @adrien2p about this before merging since he probably has opinions here 😉

adding blocked label for now

@pKorsholm pKorsholm closed this May 1, 2023
@pKorsholm pKorsholm reopened this May 1, 2023
@olivermrbl
Copy link
Contributor

Sure, can I get you to add in the PR description, what you would like to discuss?

@olivermrbl olivermrbl dismissed their stale review May 1, 2023 07:58

Requires different reviewer approval.

@olivermrbl
Copy link
Contributor

Would it be possible to include benchmarks of the effect of these changes?

Copy link
Member

@adrien2p adrien2p left a comment

Choose a reason for hiding this comment

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

LGTM, good work 💪

@adrien2p
Copy link
Member

adrien2p commented May 3, 2023

Would it be possible to include benchmarks of the effect of these changes?

The benchmark won't show much, but we go from 600 queries to 1 query instead, which has quite of an impact, instead of having the numbers of queries growing in correlation of the number of variants, it is constant :)

@kodiakhq kodiakhq bot merged commit 9838723 into develop May 3, 2023
@kodiakhq kodiakhq bot deleted the fix/performance-improvement-for-variant-availability branch May 3, 2023 09:17
@github-actions github-actions bot mentioned this pull request May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants