Repository navigation
Improve PagePanels performance - #51319
Merged
Merged
Conversation
Extract BlockQuickNavigation out of ContentBlocksList and BlockInspectorLockedBlocks so that we're not repeating the same code that outputs a list of block navigation links.
noisysocks
force-pushed
the
update/improve-page-panels-performance
branch
from
June 8, 2023 06:07
9669ca8 to
8d84d9c
Compare
|
Size Change: +142 B (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in e0e70c4. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5249819257
|
Member
|
@noisysocks, can you rebase this on top of the trunk now that #51281 is merged 🙇 |
…panels-performance
Member
Author
|
Done! |
sethrubenstein
pushed a commit
to pewresearch/gutenberg
that referenced
this pull request
Jul 13, 2023
* DRY up ContentBlocksList and BlockInspectorLockedBlocks Extract BlockQuickNavigation out of ContentBlocksList and BlockInspectorLockedBlocks so that we're not repeating the same code that outputs a list of block navigation links. * Add back check that ensures list items don't appear in list * Remove unnecessary CSS * Reduce amount of rerendering * Update __experimentalGetGlobalBlocksByName * Improve PagePanels performance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Requires #51281.
Updates the
PagePanelscomponent added in #50857 to select the minimal amount of data required. This reduces the number of component remounts and therefore improve typing performance.Why?
Gotta go fast.
How?
Before we used
useEntityRecordwhich is convenient but selects the entire record—much more data than we actually need! Using the lower level selectors is better for our use case.Testing Instructions
Screenshots
Before:
Kapture.2023-06-08.at.16.02.04.mp4
After:
Kapture.2023-06-08.at.16.03.13.mp4