The optimization process
Optimization is the process of taking an application and making it more efficient. For graphical applications, this typically means modifying the application to make it faster.
For example, a game with a low frame rate might appear jumpy. This gives a bad impression and can make a game difficult to play. You can use optimization to improve the frame rate of a game making it a better, smoother experience.
To optimize your code, use the optimization process. This is an iterative process that guides you through finding and removing performance problems.
The optimization process consists of the following steps:
- Take measurements of your application with a profiler.
- Analyze the data to locate the bottleneck.
- Determine the relevant optimization to apply.
- Verify that the optimization works.
- If the performance is not acceptable return to step 1 and repeat the process.
The following is an example of the optimization process:
- If you have a game that does not have the performance you require, you can use a profiler to take measurements.
- Use the profiler to analyze the measurements so you can isolate and identify the source of the performance problem.
- The problem with the game is, for example, rendering too many vertices.
- Reduce the number of vertices in your meshes.
- Execute the game again to ensure the optimization worked.
If you do this and the game still does not perform as expected, restart the process by profiling the application again to find out what else is causing problems.
Expect to repeat this process a number of times. Optimization is an iterative process where you might find performance problems in a number of different areas.