Help with performance (file io)

Well, a part of that trick is manually partitioning the file by hand ahead of time with head -n | tail -n… :frowning:

Not sure how to do that automatically without (slowly) scanning the lines.