Skip to content

perf: replace JSON.stringify with shallowEqual in synchronizationEngine#845

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Meme11030:perf/fix-sync-engine-stringify
Jun 29, 2026
Merged

perf: replace JSON.stringify with shallowEqual in synchronizationEngine#845
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Meme11030:perf/fix-sync-engine-stringify

Conversation

@Meme11030

Copy link
Copy Markdown
Contributor

Closes #733

  • Add shallowEqual helper to compare per-key references/values
  • Replace JSON.stringify diff with shallowEqual per SYNC_KEYS entry
  • Eliminates full-state serialization on every Zustand update
  • BroadcastChannel only fires when persisted state actually changes

Description

Brief description of changes

Related Issue

Closes #

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

Closes rinafcode#733

- Add shallowEqual helper to compare per-key references/values
- Replace JSON.stringify diff with shallowEqual per SYNC_KEYS entry
- Eliminates full-state serialization on every Zustand update
- BroadcastChannel only fires when persisted state actually changes
@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@Meme11030 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project

@RUKAYAT-CODER RUKAYAT-CODER merged commit 7dae890 into rinafcode:main Jun 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Performance] synchronizationEngine uses JSON.stringify for deep state comparison on every Zustand update

2 participants