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

perf(core): Improve hydrator performance for customFields #2961

Conversation

jnugh
Copy link
Contributor

@jnugh jnugh commented Jul 18, 2024

Remove a workaround that led to refetching relations in customFields. Prevent refetching of customFields during hydration
Fixes #2696

Description

See #2696. There was some sort of workaround that disabled the check which is in place to prevent reloading the same data over and over. entity["customFields.xyz"] will never be set because the data would be in entity["customFields"]["xyz"].
I'm still wondering if there is some edge case that made this workaround necessary but we are running this patch in production for quite some time now and we are using a lot of customFields.

Breaking changes

None I would be aware of. This might have been a workaround for a bug in typeorm maybe.

Checklist

📌 Always:

  • [x I have set a clear title
  • My PR is small and contains a single feature
  • I have checked my own PR

👍 Most of the time:

  • I have added or updated test cases
  • I have updated the README if needed

Remove a workaround that led to refetching relations in customFields.
Prevent refetching of customFields during hydration
Copy link

vercel bot commented Jul 18, 2024

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

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Jul 18, 2024 2:58pm

@michaelbromley michaelbromley merged commit f40761d into vendure-ecommerce:master Jul 19, 2024
13 of 14 checks passed
@michaelbromley
Copy link
Member

Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Jul 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EntityHydrator always refetches customFields
2 participants