Well I don't know why it would crash after 400 lines but you'll never get 306706 lines into a window anyway, there's a limit on the number of lines a window can hold in it's buffer (display at once).

As a note, if you're putting the entire file into the window you can use loadbuf or filter and it'll be thousands of times faster than looping with $read(), however that still won't overcome the window buffer limit I mentioned. There's no way to get around that as far as I'm aware.


Spelling mistakes, grammatical errors, and stupid comments are intentional.