-
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
Memoize core-data selectors #32106
Memoize core-data selectors #32106
Conversation
Now I'm curious if our performance tests did catch the regression or not. |
Size Change: +30 B (0%) Total Size: 1.05 MB
ℹ️ View Unchanged
|
It was the time GitHub actions were not behaving correctly the test failed because of not founding a selector unrelated to the changes " No node found for selector: tr[data-slug="gutenberg-test-plugin-disables-the-css-animations"] .activate a". Edited: After looking deeper The PR that caused the regression was not the template title edit and delete implementation #31678, but a follow-up bugfix #32035 and the performance tests passed on that PR that caused the regression. |
@jorgefilipecosta No blame on you here, we need some (additional) better tests :) |
77c6b14
to
20ac1f5
Compare
So after a long search, we found that the performance issue only affects block based themes (TT1 Blocks). |
20d5bb6
to
05808be
Compare
25b25a7
to
373677b
Compare
05006a1
to
6f0a317
Compare
050484b
to
2e0af2f
Compare
Can no longer reproduce the performance hit, perhaps something with the templates has now changed. |
I've been debugging the performance tests as well and this PR is still good to land (especially the selectors change). It's true that the performance impact is not very visible but it's there. A lot of components don't rerender anymore with this PR. |
7a3579e
to
07555e9
Compare
Description
Currently, the whole editor re-renders on every keystroke become a new reference is returned for the template entity record (which is also retrieved in the normal post editor).
I'm not sure IF we need to get the edited template record. If not, it's a pretty easy fix. If we do, we'll need to fix the
getEditedEntityRecord
cached selector, because it currently invalidates on any entity change.How has this been tested?
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).