Explain how you would write a Python script to parse large log files and extract performance metrics without loading the entire file into memory.