Skip to content

Conversation

adrien2p
Copy link
Member

@adrien2p adrien2p commented Sep 4, 2025

RESOLVES CORE-1154 (here some explanation why only doing that)

What

Workflow are heavely relying on the value resolution, which always parse/stringify data to prevent shared references. But in a lot of cases, these value can be primitive only and in that case there is no need to perform such action

It happen to be more than 3X faster to do nothing instead of extraneous operation plus it will have less impact on the memory and GC.

Screenshot 2025-09-04 at 14 48 36

Copy link

vercel bot commented Sep 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
api-reference Building Building Preview Comment Sep 4, 2025 0:54am
7 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
api-reference-v2 Ignored Ignored Preview Sep 4, 2025 0:54am
cloud-docs Ignored Ignored Preview Sep 4, 2025 0:54am
docs-ui Ignored Ignored Preview Sep 4, 2025 0:54am
docs-v2 Ignored Ignored Preview Sep 4, 2025 0:54am
medusa-docs Ignored Ignored Preview Sep 4, 2025 0:54am
resources-docs Ignored Ignored Preview Sep 4, 2025 0:54am
user-guide Ignored Ignored Preview Sep 4, 2025 0:54am

Copy link

changeset-bot bot commented Sep 4, 2025

🦋 Changeset detected

Latest commit: 752c278

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

This PR includes changesets to release 71 packages
Name Type
@medusajs/event-bus-local Patch
@medusajs/utils Patch
@medusajs/workflows-sdk Patch
@medusajs/medusa Patch
integration-tests-http Patch
@medusajs/framework Patch
@medusajs/modules-sdk Patch
@medusajs/orchestration Patch
@medusajs/cli Patch
@medusajs/medusa-oas-cli Patch
@medusajs/test-utils Patch
@medusajs/analytics Patch
@medusajs/api-key Patch
@medusajs/auth Patch
@medusajs/cache-inmemory Patch
@medusajs/cache-redis Patch
@medusajs/cart Patch
@medusajs/currency Patch
@medusajs/customer Patch
@medusajs/event-bus-redis Patch
@medusajs/file Patch
@medusajs/fulfillment Patch
@medusajs/index Patch
@medusajs/inventory Patch
@medusajs/link-modules Patch
@medusajs/locking Patch
@medusajs/notification Patch
@medusajs/order Patch
@medusajs/payment Patch
@medusajs/pricing Patch
@medusajs/product Patch
@medusajs/promotion Patch
@medusajs/region Patch
@medusajs/sales-channel Patch
@medusajs/settings Patch
@medusajs/stock-location Patch
@medusajs/store Patch
@medusajs/tax Patch
@medusajs/user Patch
@medusajs/workflow-engine-inmemory Patch
@medusajs/workflow-engine-redis Patch
@medusajs/analytics-local Patch
@medusajs/analytics-posthog Patch
@medusajs/auth-emailpass Patch
@medusajs/auth-github Patch
@medusajs/auth-google Patch
@medusajs/file-local Patch
@medusajs/file-s3 Patch
@medusajs/fulfillment-manual Patch
@medusajs/locking-postgres Patch
@medusajs/locking-redis Patch
@medusajs/notification-local Patch
@medusajs/notification-sendgrid Patch
@medusajs/payment-stripe Patch
@medusajs/draft-order Patch
@medusajs/core-flows Patch
@medusajs/oas-github-ci Patch
@medusajs/js-sdk Patch
@medusajs/types Patch
@medusajs/telemetry Patch
@medusajs/admin-bundler Patch
@medusajs/admin-sdk Patch
@medusajs/admin-shared Patch
@medusajs/admin-vite-plugin Patch
@medusajs/dashboard Patch
@medusajs/icons Patch
@medusajs/toolbox Patch
@medusajs/ui-preset Patch
create-medusa-app Patch
medusa-dev-cli Patch
@medusajs/ui 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

* @returns
*/
export function parseStringifyIfNecessary(result: unknown) {
if (typeof result !== "object") {
Copy link
Member Author

Choose a reason for hiding this comment

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

self-review: I purpusfully do not use isObject because I want to include Map, Set, Date etc

@adrien2p adrien2p marked this pull request as ready for review September 4, 2025 12:51
@adrien2p adrien2p requested a review from a team as a code owner September 4, 2025 12:51
Copy link
Contributor

@willbouch willbouch left a comment

Choose a reason for hiding this comment

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

again 🐐

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