Diligent interview question

How to Reduce the performance of Large running API