Present() = slow

Started by
6 comments, last by LeGreg 15 years, 5 months ago
Hi, IDirect3DDevice9::Present() - function time length: 1) Vista + Fullscreen + Aero = ~0.2ms 2) Vista + Fullscreen + No-Aero = ~0.2ms 3) Vista + Windowed + Aero = ~0.2ms 4) Vista + Windowed + No-Aero = ~20ms Something certainly seems wrong for the 4th setup. When Aero is disabled and the game window starts up, It will take up about half the screen (640x480) = this will be ~0.2ms and when I maximize, it will be ~20ms. Although if I enlarge the window to nearly the same size as maximized - it will be ~0.2ms... ...but If the bottom part of the window touches/underlaps the taskbar (even just a by a width of 1 pixel) - it will go to ~20ms just like it does in maximized mode this does NOT happen when Aero is enabled or Aero is disabled via using a classic theme. I disable Aero via DwmEnableComposition() - I get the same results if I use this API externaly and before the game has launched.
Advertisement
I think I have read somewhere that this is because of the round start button. When it overlaps your drawing area, the button has to be redrawn every frame and that will cause a huge slowdown when Aero is disabled.
Ha, when the window is under the round button section of the taskbar - it indeed goes to ~20ms.

Why is this happening only when Aero is disabled and how can I solve this?
The why: When Aero is enabled, Vista can use hardware-accelerated compositing in the window manager to blend the different windows together. When Aero is disabled, Windows has to fall back to software rendering methods to blend the overlap.

How to fix it? Uh...complain to Microsoft until they're willing to sacrifice their stupid round button in the name of performance. I don't know if there's really anything you can do. Maybe someone else will have an idea.
I found one solution - hide the start orb via ShowWindow(). This works but it doesn't look very nice :P
Quote:Original post by Neverender
How to fix it? Uh...complain to Microsoft until they're willing to sacrifice their stupid round button in the name of performance. I don't know if there's really anything you can do. Maybe someone else will have an idea.


It's "fixed" in Windows 7 - the taskbar is a little bit higher and the orb fits in there without sticking out.

In Vista, you can either auto-hide the taskbar, or increase the height. When it's double-height the button doesn't stick out like it does on a single-height taskbar.
I really hope Windows 7 will have an option to have a taskbar with text and not just icons.
Anyway measuring the time spent in present() has never been a good way to measure how much time the present actually takes..

Accurately profiling Direct3D API calls

LeGreg

This topic is closed to new replies.

Advertisement