Performance optimization for reading large text files (allCountries.txt >1GB)