Celigo interview question

how to optimize javascript application