Chili Piper interview question

How do you optimize large-scale frontend applications?