ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.37k stars 3.68k forks source link

Replace simple TreeWalker use with a more performance recursive loop #6808

Closed Reinmar closed 10 months ago

Reinmar commented 4 years ago

πŸ“ Provide a description of the improvement

I've been doing some research and found out that using a TreeWalker is 50-100x slower than using a simple recursive loop.

In the previous iteration I noticed performance boosts when optimizing the model TreeWalker or position API used by it.

TreeWaker is quite heavy due to the number of checks that it performs or created position instances. Yet, from my experience, in a number of cases we need it to scan content of particular elements.

It'd be interesting to research what kind of (model and view) tree walker instances are created in terms of:

Based on this we could figure out whether we couldn't introduce and use some quick iteration methods for simpler cases:


If you'd like to see this improvement implemented, add a πŸ‘ reaction to this post.

CKEditorBot commented 11 months ago

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot commented 10 months ago

We've closed your issue due to inactivity over the last year. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).