-
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
Small performance tweaks #23825
Small performance tweaks #23825
Conversation
Size Change: -20 B (0%) Total Size: 1.14 MB
ℹ️ View Unchanged
|
5faee36
to
ab3fb38
Compare
Seems like we're gaining 3ms out of 30ms in terms of typing. That's a 10% improvement for this tiny PR. |
@youknowriad These are great tips! Would it be helpful to have some performance tips documented, either as part of the |
@chrisvanpatten Definitely, I'm not really certain what's the best place for it, could be this page https://developer.wordpress.org/block-editor/principles/architecture/performance/ but I'd love to see these documented and other tips people have. |
Not certain how much these small tweaks will improve performance but this PR could serve at least to raise some awareness.
Using
useSelect
is not without costs. Everytime you return a value from useSelect,getBlockIndex
change often for blocks after the current selection. (Everytime a new block is added or removed)