Profiling

From OpenMW Wiki
Revision as of 18:57, 14 October 2014 by Scrawl (talk | contribs) (Created page with "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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.

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 script instruction 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).