After you read the first line to strip off the header, it will be a lot faster to read the file in chunks, as in this example: How to obtain the result of a diff between 2 files in a loop? - #4 by stevengj
1 Like