Using Array.splice when the to-be-spliced values can run into browser limits for the most arguments allowed to be passed to a variadic function. This can happen especially when initializing a large text field (i.e., a few hundred thousand characters).
This PR implements an internal utility for splitting up large splices, getting around the browser limitations on the number of function args. The chunk size 100000 comes from some experimentation with Chrome and Firefox.
Now, text files of this size also start running into problems with ID sizes, which we still need to solve. But this is a mostly orthogonal problem.
Using
Array.splice
when the to-be-spliced values can run into browser limits for the most arguments allowed to be passed to a variadic function. This can happen especially when initializing a large text field (i.e., a few hundred thousand characters).This PR implements an internal utility for splitting up large splices, getting around the browser limitations on the number of function args. The chunk size 100000 comes from some experimentation with Chrome and Firefox.
Now, text files of this size also start running into problems with ID sizes, which we still need to solve. But this is a mostly orthogonal problem.