Explain how you would optimize a slow-running Python script that processes large text files containing clinical trial notes.