-
-
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
Improve performance of _insertNodes
#17522
Conversation
How does the custom Question two: maybe we could reimplement custom |
Native
This is the only place where the
Changing the array's length upfront is (surprisingly) much slower. |
No comments.
I am for replacing it and having this as minor breaking change. In general, people should not have a need to use |
64642f8
to
2b1a75c
Compare
2b1a75c
to
e80e213
Compare
Suggested merge commit message (convention)
Other (engine): Improve performance of
_insertNodes
.Other (utils): Change the implementation of
spliceArray
to modify the target array for better performance.MINOR BREAKING CHANGE (utils):
spliceArray
now modifies the target array and doesn't accept a fourth (count
) argument.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 onmaster
)formattingLongP
inlineStyles
mixed
wiki