-
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
Perf metrics: update select and other metrics to use non-empty paragraphs #66762
Conversation
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. |
Size Change: 0 B Total Size: 1.82 MB ℹ️ View Unchanged
|
Cc @youknowriad in case you have an opinion |
@@ -270,7 +270,7 @@ test.describe( 'Post Editor Performance', () => { | |||
const canvas = await perfUtils.getCanvas(); | |||
|
|||
const paragraphs = canvas.getByRole( 'document', { | |||
name: /Empty block/i, | |||
name: /Block: Paragraph/i, |
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.
I always forget the rule when we should make labels compatible with old branches, but this seems to be okay since tests create the fixtures.
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.
Yes, it shouldn't be needed since in both environments we create filled paragraphs now.
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.
Thank you @ellatrix!
The changes make sense to me.
I'm ok with this change :) |
Thanks :) |
What?
#66636 caused an increase in the "select" metric simply be restoring the empty paragraph inserter. This made me realise that the paragraphs used in the test are all empty!
Why would this be a real scenario? Most blocks that someone will select will NOT be empty. The empty paragraph (default block) is actually an exception in many ways: we do not render the block toolbar, and we do render the inserter. Why would we want to test an exception?
I don't see how a 1000 empty paragraphs a good scenario for any perf test, so I changed the util.
Why?
Unrealistic performance test.
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast