-
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
Slow site editor when navigation block has multiple submenu items #68875
Comments
cc @Mamaduka just in case it becomes an issue for 6.8 as well. I confirm that I reproduce the issue as well. |
I can produce a performance degradation with WC active in
Initially it will render promptly, the block that gets hovered and the block that loses hover both render in ~0.3ms (Component):
Now the blocks that receive and lose hover in the list view render significantly longer, ~4ms here:
Here are the blocks for testing:
Some actions can fix it as well, like adding some more blocks, or deleting some, sometimes fixes it for some time, and then it slugs down again. Very odd. |
@mmtr, were you able to track down which types of block this affects? Looking at the Jetpack hotfix PR, it seems the bottleneck is the |
@Mamaduka I didn't. I always use the "Submenu" block to check the overall performance because the degradation is immediately noticeable with that block, but I have no idea about other types of block. My guess is that all blocks that require a specific parent block to be inserted are the ones more affected. |
Description
There is a performance issue in the site editor when editing a template that contains a navigation block with multiple submenu items.
The performance issue is practically unnoticeable by default, but it gets worse when activating plugins that register additional blocks (e.g. CoBlocks or WooCommerce).
Upon bisecting the latest changes, it seems that this is a regression introduced by #67734.
Step-by-step reproduction instructions
Scenario 1 – A
Screen.Recording.2025-01-24.at.12.14.49.mov
Scenario 1 - B
Screen.Recording.2025-01-24.at.12.15.38.mov
Scenario 1 - C
Screen.Recording.2025-01-24.at.12.19.14.mov
Scenario 2 – A
Screen.Recording.2025-01-24.at.12.25.44.mov
Scenario 2 - B
Screen.Recording.2025-01-24.at.12.27.47.mov
Scenario 3 - C
Screen.Recording.2025-01-24.at.12.29.33.mov
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: