in reply to Re^2: Print some lines in a range
in thread Print some lines in a range

The first stops when enough has been read. Both the second and the third read the entire file. The difference is that the third loads the entire file into memory. And since we're talking about at least 50,000 lines, you might be running into swapping issues. The third definitely has a lot more memory allocations (one per line) than the second (almost none), and those aren't cheap.