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(nuxt): mark payload as shallowReactive #27214

Merged
merged 6 commits into from
May 16, 2024

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves #26825

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This improves performance by not marking the entire Nuxt payload as reactive - but granularly enabling shallow reactivity first in the parts of it that we need to be reactive.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

stackblitz bot commented May 14, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@danielroe danielroe marked this pull request as ready for review May 14, 2024 16:41
@danielroe danielroe merged commit c545c1d into main May 16, 2024
61 checks passed
@danielroe danielroe deleted the perf/shallow-reactive-payload branch May 16, 2024 14:14
@github-actions github-actions bot mentioned this pull request May 16, 2024
2 tasks
@daniluk4000
Copy link
Contributor

That's sick πŸ”₯

@Mini-ghost
Copy link
Contributor

@danielroe

Since this PR marks payload as shallowReactive, should the reactive that was removed in this PR #26558 be restored? Or, as mentioned at the PR end, does runtimeConfig not require reactivity?

@danielroe
Copy link
Member Author

I think it might not require reactivity at all.

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.

move nuxtApp.payload to shallowReactive and move renderJsonPayloads out of experimental
4 participants