Chili Piper Interview Question

How do you optimize large-scale frontend applications?