-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
ListView: reduce subs per item #58542
base: trunk
Are you sure you want to change the base?
Conversation
Size Change: +78 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
Agreed. It became easy to include one more piece of information in that hook. We should probably refactor its usage in the code base and deprecate it. |
cd92ea9
to
dd525ea
Compare
Looks like this PR is throwing an error after #58533 landed, which added a check to return early if a |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core SVNIf you're a Core Committer, use this list when committing to
GitHub Merge commitsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Are we planning to track typing performance metrics with List View open? I think it would be an excellent way to validate performance improvement. |
Not against that :) |
What?
A couple of things:
getBlock
selector, it's only needed for the clientId.useBlockDisplayInformation
. This is a terrible way to get information, because you cannot specify the information you need. We should use store selectors instead. If the store selectors are awkward, we should create better store selectors. In this case we're only using it to get the block title and whether it's a synced block.useBlockLock
, we don't need all the info there, and we create a separate subscription. Let's create better selectors if it's too verbose.Why?
We're currently retrieving unnecessary information from the store. Also every block editor store store subscription slows down load but especially typing (in this case typing with the list view open).
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast