-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Improve performance of getSelectedBlocks
#17582
Conversation
Looks good and is a simple and safe fix. However, since it only targets a specific scenario (one element in selection), I am afraid we may need to revisit it. The problem with current implementation is that it only looks at
Of course, we should respect this special case that is mentioned later:
Maybe it's even possible to limit the number of |
I implemented the suggestions. The ckeditor5/packages/ckeditor5-engine/src/model/treewalker.ts Lines 187 to 193 in 4883755
|
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.
Please also apply mentioned changes in the view tree walker.
Co-authored-by: Szymon Cofalik <s.cofalik@cksource.com>
Suggested merge commit message (convention)
Other (engine): Improve performance of
getSelectedBlocks
when selection contains only one block element. Closes #17629.This greatly improves how long it takes to make a selection over a big table.
Use
Squash and merge
, as it's a fairly simply change with too many commits.