-
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
Try nested patterns previews with block editor setting #44784
Try nested patterns previews with block editor setting #44784
Conversation
Size Change: +53 B (0%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
I like this. I wonder what other "optimizations" we could do in BlockPreviews (like avoid rendering a lot of UI...) Curious what others think |
I think this is the way to go. I closed out my PR in favor of this. |
@youknowriad do you think we can land this and create a follow up issue for further optimizations? I think it would take some time to identify such things and measure perf results from excluding them. |
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.
WFM
Same, nice to see this land! |
What?
An attempt to fix: #39732
Alternative to #42832 and #44773
Why?
In every block editor instance inside the
BlockList
we useusePreParsePatterns
for better performance to preparse the available patterns. This means we would need to parse them for every block preview that loads a new editor. This PR introduces a new block editor setting(__unstableIsPreviewMode
) which is checked in theusePreParsePatterns
hook. So in the scenario of nested patterns, they will be lazy loaded/parsed.Testing Instructions