Conversation
|
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 If 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. |
|
Size Change: +11 B (0%) Total Size: 2.19 MB
ℹ️ View Unchanged
|
69586fb to
dbcdc82
Compare
|
Flaky tests detected in e089485. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18755986545
|
925d731 to
f7dd761
Compare
f7dd761 to
bb11e4b
Compare
Combining selectors where possible is good for performance. This refactor keeps the complexity isolated while eleminating an unnecessary extra subscription.
| ! _showEmptyBlockSideInserter && | ||
| hasSelectedBlock && | ||
| ! isEmptyDefaultBlock; | ||
| export function calculateShowBlockTools( { |
There was a problem hiding this comment.
What's the goal of this one? An early implementation of shouldShowBlockTools?
There was a problem hiding this comment.
Quick refactors as I go to see if they had an impact. I've heard from multiple folks that one of the performance hits of the codebase is how many selectors we have. So, if I come across a place while I'm debugging that I can quickly and easily refactor selectors into one, I'm doing it and moving on.
In this instance, use-show-block-tools was used in one place that was already using the same selectors, so I refactored so it could use the same subscription.
This PR is a dumping ground for all the quick little things I come across to see if the drops in the bucket add up over time and improve code quality. If they do, then they can be spun out to separate PRs if needed.
There was a problem hiding this comment.
Ah - I didn't realize both versions were still around! I've made this sandbox PR a draft and moved this work over to #73012 to get officially reviewed.

What?
A lot of the performance metrics are creeping upwards.
This PR is an exploration for improving block editor performance. Related to #72496
Bundling these changes to see if we can make a meaningful impact on the metrics, and, if so, we can spin them off into individual PRs in case there are regressions that we need to revert.
Why?
Perf improvements = 🚀
How?
Add early return to avoid subscriptions for:
Testing Instructions
There should be no changes in functionality
Testing Instructions for Keyboard
Screenshots or screencast