Optimized parser performance by separating the process of reading the file and processing its contents