-
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
Add bulk actions for block editing modes #60312
Add bulk actions for block editing modes #60312
Conversation
Size Change: +114 B (0%) Total Size: 1.72 MB
ℹ️ View Unchanged
|
Did you try using |
I hadn't yet. And now that I have it seems the |
What?
Adds two new actions for bulk editing block editing modes.
setBlockEditingModes
which takes an iterable (Array
,Map
, etc.) of client id and mode tuples to set.unsetBlockEditingModes
which takes an interable of client ids to unset.Updates the places that could benefit from using the new actions.
Why?
In #59249 we were running into performance issues around setting block editing modes in a loop. Each action causes a
new Map()
to be created which was causing memory thrashing and really bad performance when switching editing modes.@Mamaduka pointed out in #59249 (comment) that there were other places that could benefit from the change, so I've extracted this into a separate PR.
How?
Only creating one
new Map()
for a full set of changes is much more friendly to the garbage collector.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast