Allow me to gloat/whimper at the time I had to edit a 3-million-line file. I'll also slide in some VMS advocacy.
It was a (very) large DXF, and I used the VMS editor, which is cunningly called "edit" and which has that "I was written by real programmers, me" feel about it. It never crashes. It never accidentally fucks you up. The box (1GHz 21264 with 2GB RAM and "lots" of disk) didn't even blink when I went from one end of the file to the other - this is always a good test to see if the programmer really wants you to edit Very Big Files with their editor. Didn't take long to save it, either. And I got a free version. And if you "diff/par somefile.dxf" without specifying the version number it automatically assumes you mean this version against the previous version, which is of course what you wanted. And you can do the diff right there in the editor.
VMS pwnz j00. But you knew that.