Skip to content

Commit

Permalink
Merge pull request #17586 from ckeditor/cc/performance-mapper-2
Browse files Browse the repository at this point in the history
Other (engine): Introduced dynamic caching in `Mapper` in order to improve view-to-model mapping performance, and as a result improve editor data load and data save performance. Closes #17623.

Other (engine): New parameter `data` was added for `change:children` event fired by `ViewElement` and `ViewDocumentFragment` when their children change. `data` is an object with `index` property, which says at which index the change happened. Related to #17623.

Other (engine): `Mapper#registerViewToModelLength()` is now deprecated and will be removed in one of upcoming releases. Note: if this method is used, the caching mechanism for `Mapper` will be turned off which may degrade performance when handing big documents. Note: this method is used by the deprecated legacy lists feature. See #17623.

MINOR BREAKING CHANGE (engine): `Mapper#registerViewToModelLength()` is now deprecated and will be removed in one of the upcoming releases. This method is useful only in obscure and complex converters, where model element, or a group of model elements, are represented very differently in the view. We believe that every feature that uses custom view-to-model length callback can be rewritten in a way that this mechanism is no longer necessary. Note: if this method is used, the caching mechanism for `Mapper` will be turned off which may degrade performance when handing big documents. Note: this method is used by the deprecated legacy lists feature. As a result, you will not experience the performance improvements if you are still using deprecated legacy lists feature.
  • Loading branch information
scofalik authored Jan 28, 2025
2 parents c7e22bd + acd1664 commit dc4d238
Show file tree
Hide file tree
Showing 5 changed files with 1,140 additions and 59 deletions.
Loading

0 comments on commit dc4d238

Please sign in to comment.