-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Site Editor: Slow performance with complex block themes #55892
Comments
I've recently added a "navigate" metric to the site editor to track this. It's a first step, the metric might not be perfect but at least it will help us get some visibility here. |
Tagging for @WordPress/performance folks! |
Today I timeboxed some experimentation with disabling the animations here and there, and it seemed like turning off only the cc @ciampo I recall you worked on those animations a while ago: do you recall any design decisions or discussions behind having them in the first place? I wonder how much of them we can remove or simplify. |
@draganescu could I borrow your help in testing #56795? Does it resolve the performance issue in your testing? Disregard that the |
Animations are one of the reasons why |
Thank you @ciampo! I'd be happy to take a look myself, but it may not be earlier than next week. |
Fantastic, thank you! 🙌
Tested it and left some feedback at #56909 (review) |
I spent some time looking at the Patterns library because that part is still not performing well even though #56909 improves the overall experience a lot. I wanted to share some of the findings. My starting point was the lagging animation when changing between all and synced patterns on Screen.Recording.2023-12-12.at.11.20.27.movUsing a modern MacBook Pro with M1 Max Chip. The same user interaction but with 4x CPU slowdown: Screen.Recording.2023-12-12.at.11.21.43.movDoing a performance analysis within Chrome devtools we get a graph like this (only 1 switch): This all looked very confusing and convoluted so I tried to see what's going on by going to a pattern category with only 1 pattern to get a more focused performance graph and indeed the rendering of the I pushed 69180b8 (#56973) to artificially slow down the rendering of those block previews and separate what's happening on a site with lots of patterns. I'm not exactly sure how the |
#54999 seems relevant to my last comment. |
@flootr it may be that the perceived performance degradation comes from different things, maybe:
Indeed #54999 is something I am trying to address in the linked PR there, stuck at the moment around rendering "demo" content when previewing empty blocks (which on the client just comes from "example" data). |
Description
As discussed with @draganescu and @youknowriad, the UI performance of the site editor using complex block themes (such as TT4) is pretty bad - it gets stuck, and takes a long time to load.
@draganescu made the observation that the UI may be not orchestrated properly - it’s too reactive to the whim of the router:
@draganescu also suggested that one way to approach it could be to optimize it so that the UI is always updated 1st so that the thread is 100% free and once it’s done we can then update the frame.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: