Profiling

Applies to OpenMW 0.33 and later.

General notes
Make sure to profile with a save-game, rather than a fresh game using --skip-menu. This is very important because the number of actors in the scene depends on random factors - for example levelled creature spawns. Saving the game ensures that these parameters stay the same.

Use the ToggleAi console command to stop actors from randomly wandering around. Walking actors are more costly to process than idle ones, so disabling this alleviates randomness from the profiling results.

Components
The main bottlenecks are expected in the graphics, physics and script components. We can roughly measure their impact by enabling or disabling them.

Neither of the following measurements are perfectly accurate and should be taken with a grain of salt. Use of an actual profiling application should be preferred, but real time instruments can give you a good first overview.

Scripts
Enable the main menu (Esc) to pause script executions. Enabling other menus (eg inventory) may also reduce the impact, because some scripts have an "if (menuMode) return" type statement, but this can not be relied on.

Graphics
Use the toggleWorld console command to disable world rendering. This removes the bottleneck from number of batches and overdraw, but does not stop update of the scene graph.

Physics
Use the F10 key to show the bullet physics profiler.

Physics will be disabled while the game is paused (either via main menu, or any other active GUI window).