Trying to insert a large amount of lines at the end of an ASS script at once causes the maximum number of table items unpacked to arguments to be exceeded.
This PR rectifies that issue by processing large inserts in chunks of at most 1000 lines. This is lower than the limit of 8000 items imposed by LuaJIT, but still fast enough to make it worthwhile to stay on the safe side wrt/ stack size.
Trying to insert a large amount of lines at the end of an ASS script at once causes the maximum number of table items unpacked to arguments to be exceeded. This PR rectifies that issue by processing large inserts in chunks of at most 1000 lines. This is lower than the limit of 8000 items imposed by LuaJIT, but still fast enough to make it worthwhile to stay on the safe side wrt/ stack size.