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

feat(medusa, core-workflows, product): slightly improve create cart workflow #5725

Merged
merged 6 commits into from
Dec 7, 2023

Conversation

adrien2p
Copy link
Member

@adrien2p adrien2p commented Nov 27, 2023

What
Improve create cart workflow, passing the entity instead of just the id when we have the entity at hand will prevent the create step to do the entire work a second time from within the cart service. The workflow have been design to split the creation into multiple steps, calling the cart service create method will also do the same step as we are currently only providing ids. On simple cart creation involving the region I got a 15% better response time from 108ms to 92ms after 600 requests for 45s

Copy link

changeset-bot bot commented Nov 27, 2023

🦋 Changeset detected

Latest commit: 34585d7

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

This PR includes changesets to release 2 packages
Name Type
@medusajs/medusa Patch
@medusajs/core-flows 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

Copy link

vercel bot commented Nov 27, 2023

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

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Dec 7, 2023 9:45am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Dec 7, 2023 9:45am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Dec 7, 2023 9:45am

@adrien2p adrien2p marked this pull request as ready for review November 27, 2023 11:55
@adrien2p adrien2p requested a review from a team as a code owner November 27, 2023 11:55
Copy link
Contributor

@carlos-r-l-rodrigues carlos-r-l-rodrigues left a comment

Choose a reason for hiding this comment

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

LGTM

packages/medusa/src/types/cart.ts Outdated Show resolved Hide resolved
packages/core-flows/src/handlers/region/find-region.ts Outdated Show resolved Hide resolved
@olivermrbl olivermrbl changed the title slightly improve create cart workflow feat(medusa)slightly improve create cart workflow Dec 7, 2023
@olivermrbl olivermrbl changed the title feat(medusa)slightly improve create cart workflow feat(medusa, core-workflows, product): slightly improve create cart workflow Dec 7, 2023
@olivermrbl olivermrbl merged commit 85cda7c into develop Dec 7, 2023
12 checks passed
@olivermrbl olivermrbl deleted the feat/improve-create-cart-workflow branch December 7, 2023 16:05
@github-actions github-actions bot mentioned this pull request Dec 7, 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