ckeditor5/build/docs/ckeditor5/12.0.0/features/remove-format.html):<p><code><i><s><strong><sub><sup><u>You can use the remove format feature to easily clean up text formatting.</u></sup></sub></strong></s></i></code></p><p><code><i><s><strong><sub><sup><u>Some examples of the formatting removed by this feature: bold, italics, underline, strikethrough, code, subscript, superscript, </u></sup></sub></strong></s></i></code><span class="text-tiny"><code><i><s><strong><sub><sup><u>font size</u></sup></sub></strong></s></i></code></span><code><i><s><strong><sub><sup><u> as well as </u></sup></sub></strong></s></i></code><span style="font-family:'Courier New', Courier, monospace;"><code><i><s><strong><sub><sup><u>font family</u></sup></sub></strong></s></i></code></span><code><i><s><strong><sub><sup><u>.</u></sup></sub></strong></s></i></code></p><p style="text-align:center;"><code><i><s><strong><sub><sup><u>Remove format resets the text alignment too.</u></sup></sub></strong></s></i></code></p><p><code><i><s><strong><sub><sup><u>Note: The feature will not erase non-formatting content — </u></sup></sub></strong></s></i></code><a href="https://ckeditor.com"><code><i><s><strong><sub><sup><u>your links</u></sup></sub></strong></s></i></code></a><code><i><s><strong><sub><sup><u> are safe!</u></sup></sub></strong></s></i></code></p>
Expected: Formatting is removed ASAP
Actual: It takes more than 3s to remove the formatting on a quad core i7. It's just a few paragraphs.
Undoing the operation also takes a lot of time. Probably there are too many deltas produced during the operation.
cc @mlewand @scofalik
Just to let you know: the sample I provided is not the most common use–case. 4 or 5 formatting attributes on the same chunk of text are not very common, so it's not a high priority issue.
I can confirm this problem, experiencing same issue.
Most of the execution time goes to model._runPendingChanges. Looks like a generic issue that should be fixed in the engine:

model._runPendingChanges is the method which wraps... basically everything. The first half of this log are all changes in the model and converting it to view and the second half is rendering it to DOM. So it is not surprise it takes most of the time since it do most of the things :D
Don't get me wrong. I do not say there is nothing to be optimise, but everything to be optimised in the editor is somewhere inside _runPendingChanges.
@pjasiun sure, I'm just showing that the problem exist. As for pointing out the exact place where issue occurs, I intentionally skipped going into details - we'll get back to this as we have more time to fix this properly.
Let's close this as a DUP of https://github.com/ckeditor/ckeditor5-engine/issues/1720.
Wow, I've just checked this and the result is 0.2s. It was 3s before, so we have more than 10x improvement :exploding_head:Â

Most helpful comment
Wow, I've just checked this and the result is 0.2s. It was 3s before, so we have more than 10x improvement :exploding_head:Â