Windows 7's -actually any modern OS- video stack adds an absurd overhead to video mode switching. It's something you're not supposed to do so often in normal applications. With regards to games switching resolutions, there are some things that can be done to avoid issues:
- Disable the -changeres option in mame.ini. This will leave the game all the time at its default resolution, the one that's reported by MAME xml. You'll have a single mode change on load, then no in-game mode switching. The problem with this is, very often the resolution reported is the first one assigned by the hardware initialization, which doesn't match the main video mode used by the game.
- Force a given resolution by means of the -resolution option. This by itself will disable mode switching (same as -nochangeres) but you can specify the main video mode that's actually used during the game play.
- Use super resolutions. By using super resolutions, most mode changes will be unneeded. Only vertical resolution changes will trigger an actual video mode change. This is ideal for some systems (Sega, etc.) which change horizontal frequency very often while leaving vertical unchanged. For systems that also change vertical resolution, the previous method is preferred.
Besides this, follow these recommendations when possible:
- Try to keep your mode list as short as possible, this will make mode changes work faster. Super resolutions will be of help here.
- Only enable the outputs you actually use. Each extra output that's enabled exponentially increases the time required by certain graphic API calls (e.g. EnumDisplaySettings).
- When possible, use your frontend as your system shell (instead of explorer.exe). Having the default shell at the background means that upon a mode change, Windows will send messages to all the little things that live on your desktop, asking them to redraw themselves etc., which takes a lot of time.