Optimize a resource-constrained algorithm to parse and filter massive system log files without loading the entire dataset into memory for Runpod.