Optimization strategy
Let's say your program has a real speed problem you need to resolve. Do not try to guess how to make it faster. Bottlenecks are often hard to find by looking at the code, and a set of tools is needed to find the real problem.
A good optimization strategy can start with three steps:
- Find another culprit: Make sure a third-party server or resource is not faulty
- Scale the hardware: Make sure the resources are sufficient
- Write a speed test: Create a scenario with speed objectives
Find another culprit
Often, a performance problem occurs at production level and the customer alerts you that it is not working as it used to when the software was being tested. Performance problems might occur because the application was not planned to work in the real world with a high number of users and an increase of data size.
But if the application interacts with other applications, the first thing to do is to check if the bottlenecks are located on those interactions. For instance, a database...