Skip to content
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 _insertNodes #17522

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

filipsobol
Copy link
Member

@filipsobol filipsobol commented Nov 22, 2024

Suggested merge commit message (convention)

Other (engine): Improve performance of _insertNodes.


In #17456 I improved the performance of spliceArray. However, it turned out that it still does more than we need and because it's called often, we pay a price for it. This PR reduces the number of intermediate arrays we make whenever _insertNodes is called.

Below are the improvements (while on the remove-registerViewToModelLength branch, the percentages will be different on master)

Test name Change in % Change in ms
formattingLongP -6.1 -260
inlineStyles -7.9 -650
mixed -5.0 -120
wiki -4.3 -140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant