-
-
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
Review most used code in terms of performance #6528
Comments
And another gain by using after: Side note: because of the time fluctuation I'd only consider an order of magnitude change (as above) to be significant enough. |
Waiting for the PRs... 🛎 |
Another finding - the
Below is a result Before: After (removing string concatenation and do not call |
I've double checked the latter finding and this is bonkers: Current code: After changes only in RootElment: The changes: is( type, name ) {
if ( !name ) {
return type == 'rootElement' || type == 'element' || type == this.name || type == 'node';
} else {
return ( type == 'rootElement' && name == this.name ) || ( type === 'element' && name == this.name );
}
} |
Other: Improved the performance of the `Position` constructor by optimizing for the fast path where the root element is passed as the position root. Closes ckeditor/ckeditor5#6528.
Other: Improved the performance of the `Position` constructor by optimizing for the fast path where the root element is passed as the position root. Closes #6528.
📝 Provide a description of the improvement
Doing the MergeCells command PR review @oleq found out that undoing merge of large selection is pretty slow.
It looks like some significant time is spent in code that is not suspicious at a first glance. Some examples are (from initial report):
is()
comparison is doingstring.replace()
formodel:
prefix checking. Adding many checks up this is significant time.Array.concat()
that has some performance issues. Changing it to spread operator (as a wild guess - it hasn't that performance boost in synthetic tests) also cut some time.I see a potential quick win (spending additional 1-2 hour) in reviewing some repeatable code and checking if it has some potential fixes (ie those that will not change logic or API).
If you'd like to see this improvement implemented, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: