-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Block Editor: Subscribe only to block editor store in useBlockSync
#55041
Conversation
Size Change: +1 B (0%) Total Size: 1.62 MB
ℹ️ View Unchanged
|
Flaky tests detected in 0e9f2b3. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6404978106
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement, @tyxla!
I couldn't spot any typing regressions when doing smoke tests; I also tested with CPU throttling.
P.S. Let's check CI performance results as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I'm wondering if this would improve performance noticeably. Thank you!
Thank you both 🙌
While I didn't spot any regressions looking at the performance results in CI here, I'm going to keep an eye on the aggregated results in code vitals. |
Makes sense thank you |
Great idea! I also noticed this opportunity but you also implemented it 🙂 |
What?
This PR updates an inner subscription inside
useBlockSync
to only subscribe to the block editor store, instead of to all stores.Why?
While doing another quick timeboxing session on #54819 I noticed that we're currently subscribing to all stores in
useBlockSync
when syncing back from the block editor store to the controlling entity. However, we're using only the block editor store, so there's no need to subscribe to all other stores.How?
We're just adding the block editor as the store descriptor to subscribe to.
Testing Instructions
Smoke test typing and verify all checks are green.
Testing Instructions for Keyboard
None
Screenshots or screencast
None