-
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
Performance: Fetch permissions for visible patterns only #64606
Conversation
Size Change: +22 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
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.
Thanks for the quick work here @youknowriad 🚀
This is testing well for me and makes a huge difference compared to trunk.
Using the videos below to roughly check the time it took to create a new pattern and navigate to the pattern editor, each branch took:
- Trunk: about 2min 22secs
- This PR: < 1s
Similar improvements are also seen for other tasks such as deleting a pattern.
When initially loading the patterns page with a thousand patterns, there's still a considerable delay before the My Patterns category and count shows. That seems like a separate opportunity for fine-tuning though.
It's been a while since I've looked at the Patterns page, so feel free to wait for a second approval but I'm happy to give this a ✅ now.
Trunk | This PR |
---|---|
Screen.Recording.2024-08-19.at.5.21.39.PM.mp4 |
Screen.Recording.2024-08-19.at.5.14.29.PM.mp4 |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
The #64504 should also improve permissions requests. |
…4606) Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
What?
When rendering patterns, we need the user permissions. Unfortunately right now, the only way to fetch the permissions is to do a request per pattern. There's some ongoing work to improve that but in the mean time, this PR restores the previous behavior where we fetch the permissions for visible patterns only.
Testing Instructions
Please check #64219 for detailed steps.