Did you know: All GDI apps render slower under Win7?


Recommended Posts

Okay this is well known since Vista and Windows 7 came out but just to make some of you aware who might now be knowing:

Some information :

http://msdn.microsof...0(v=vs.85).aspx

http://blogs.msdn.co...2d-and-gdi.aspx

http://blogs.msdn.co...in-windows.aspx

http://www.passmark....performance.htm

And some benchmarks:

Part 1: http://www.tomshardw...s-gdi,2539.html

Part 2: http://www.tomshardw...gdi,2547-1.html

And some demos:

What they're all basically saying:

Under Windows XP, GDI is fully hardware-accelerated by the GPU. Windows Vista removed GDI acceleration completely and therefore GDI runs on the CPU without any optimization. Under Windows 7, GDI runs on the CPU, but is partially accelerated, a very small subset of operations are optimized to be faster. Specifically, only 6 operations are accelerated out of hundreds of GDI operations.

So how does this correspond to graphics performance? GDI has been used from the very beginning of Windows until now. It's "the" main tool to draw interface elements and other such things in Windows. So to say... your web browser, your IM windows, your Explorer interface, the Control Panel, the widgets on your desktop, most of them use GDI to draw their interfaces. The only exceptions are applications that support Direct2D, which have recently come out: Firefox 4, and Internet Explorer 9. So GDI is used to draw pretty much... everything. What about those transparent/glass frames in Windows 7? Well, they're part of the new Desktop Window Manager (DWM) process, which acts as an overlay to the underlying windows.

DWM redirects window draw routines to an offscreen buffer and then re-draw them back to the main screen. That means for any window, DWM is redrawing their contents... twice. Coupled this with slower GDI performance than Windows XP. On the other hand, DWM will ensure the contents of the window fit in before it redraws the whole window, so when you drag the window around, it won't cause graphical glitches because now the window will only be redrawn when it's complete.

On the other hand, not using DWM will free up a lot of CPU resources. But still not enough to make GDI render operations as fast and responsive as Windows XP, as XP has more CPU free to do other tasks. If there is a fix for this, I would love to know, too... but it seems like this is already an integral part of Windows 7. The driver model has had to be rewritten to accomodate the new driver device interface (DDI) of DirectX 10 and beyond, and they had to shaft GDI hardware acceleration to accomplish that. They chose to remove GDI hardware acceleration as they found it hard to combine both driver model features. So there is no likely fix in the future except for a whole new edition of Windows.

That said, though, it's not all a loss. Developers can move to Direct2D, and bring hardware acceleration back to their Windows 7 applications. The problem is, though, that Direct2D is not so widely accepted. Not a lot of developers feel inclined to use it when most PCs nowadays can handle GDI in their CPUs just fine. Plus Direct2D is a whole new library, so learning it would be like discarding years of knowledge about window interface programming. Even Microsoft themselves are not doing too many things in Direct2D explicitly... except for Internet Explorer 9 no Microsoft app is using D2D AFAIK. Windows Live Messenger, Windows Media Player, Windows Explorer, and the various control panels within Windows 7 are still using GDI to draw their interfaces.

So I think whether or not we'll see smooth applications is entirely up to software developers. So to sum it up for the layman and for those who might not have enough time to read all of the rambling I wrote above:

Windows XP beats Windows 7 hands down when it comes to GDI rendering performance and 99.9 % of apps use GDI. But Windows 7 has less drawing glitches thanks to DWM. Windows Vista/7 do not have hardware accelerated GDI rendering or hardware accelerated audio rendering either (DirectSound).

If Microsoft is banging the IE9 drum about how great it is to have a hardware accelerated browser, it's because it was because IE7 and IE8 were giving slower performance on Windows Vista/7 compared to the same browsers on XP.

Moral of the story: Be informed before you trash XP as having slower graphics rendering. It's only Direct2D rendering which XP doesn't have (and which very few apps use today). GDI and 2D drawing have always been hardware accelerated up to XP even by non-3D hardware. Today, all your GDI apps run slower than XP. And send feedback to Microsoft to accelerate all GDI operations in a future Windows version (WDDM 1.3 or 1.4).

Still couldn't pay me to go back to XP though, there's just so much that 7 does better than XP that a tradeoff for a bit of GUI performance just isn't worth it to me. (Never mind all the annoying quirks and glitches than XP still has.) And that's just old style GUI rendering, doesn't mean the application itself is any faster... more often than not 7 outperforms XP where it really matters, and randomly scrolling a file manager as crazily as possible isn't one of the top criteria.

Wasn't the direct GDI rendering in XP the source of a few security vulnerabilities?

I remember the fix before MS finally got a patch out was to unregister the built-in picture viewer, so quite frankly, to have slightly slower window drawing VS a much better security side with less hardware exploits, it's a worthwhile sacrifice.

I personally have not noticed 7 being slower to redraw than XP other than very slightly during resizing windows (which is par for the course with a compositing window manager).

Anyhow, you might find that the 6 functions which are accelerated might actually make up 50% of the calls in real world usage.

This is obvious and well known.

XP GUI without divers is horribly slow, but with drivers -benchmark wise- it is much faster than Windows 7 GUI.

The black (sometimes white) underframe effect can be seen in virtually everything. When I maximize Opera, I see this effect.

Microsoft simply hasn't bothered hiding this for some bloody reason.

They could have sped up services and policy editors to render significantly faster to make that effect not so horrid - they didn't.

I am also not sure that D2D fixes the issue...

Anyhow, you might find that the 6 functions which are accelerated might actually make up 50% of the calls in real world usage.

True that and Microsoft's claim is exactly that users may not find that noticeable of a difference plus they already have acceleration for the most commonly used functions in Windows 7.

I am not saying go back to XP either. I am making those who dunno aware to send feedback to Microsoft to fully accelerate GDI once again as the entire ecosystem of Windows apps are never going to be rewritten to use Direct2D. :) If GDI is fully hardware accelerated, there would be no slowdown. Graphics manufacturers as Tom's hardware says pay no attention to 2D performance any more in their race to chase the highest FPS for 3D performance.

GDI will be fully hardware-accelerated soon, since they're rewriting it as a layer above DirectX. All existing apps will use Direct2D, DirectWrite and DirectX APIs, via the GDI.

See this MS patent on redirecting graphic calls: http://www.freepaten...20090328080.pdf

and this slide:

.gdifuture_m.jpg

from this presentation: http://download.micr...-t515_wh08.pptx

PS: Like it or not, GDI is old and completely obsolete, and never allowed what Direct2D allows in terms of performance. There's a reason why no browser implements content acceleration on XP (except Opera, which does so using OpenGL and not DirectX)

  • Like 2

GDI will be fully hardware-accelerated soon, since they're rewriting it as a layer above DirectX. All existing apps will use Direct2D, DirectWrite and DirectX APIs, via the GDI.

from this presentation: http://download.micr...-t515_wh08.pptx

PS: Like it or not, GDI is old and completely obsolete, and never allowed what Direct2D allows in terms of performance. There's a reason why no browser implements content acceleration on XP (except Opera, which does so using OpenGL and not DirectX)

Lol what? That is from a Windows 7 WinHEC presentation which simply says Direct2D will replace GDI for new apps which it has already. Doesn't mean all GDI apps will transform themselves into Direct2D apps without developers rewriting them. GDI is deprecated as of Windows 7 (2009) because WPF was a managed code platform meaning all native code apps written from the beginning of Windows to 2009 and the dozens being written today still use GDI.

The Windows Live Essentials suite does use Direct 2D in certain areas - Windows Live Messenger and Windows Live Mail do for sure, and I'm sure I've heard them mention all the other apps in the suite do too.

DWM also doesn't draw fully twice - it draws once too a bitmap off screen, and then when that's complete it just copies the bitmap for use / composition - it doesn't go through draw operations again. (In effect similar to a standard frame buffer then?)

GDI is deprecated as of Windows 7 (2009) because WPF was a managed code platform meaning all native code apps written from the beginning of Windows to 2009 and the dozens being written today still use GDI.

Not all unmanaged programs use GDI, there are a few that use Direct2D. As a guess most of them are retaining pure GDI mode just for backwards compatibility with XP, until it officially dies off anyway.

Yes we knew this, we knew GDI+ had it's day and Direct2D is meant to be taking over. Unfortunately, we won't see the real benefits until developers kill off GDI all together. Microsoft didn't drop it to **** people over, it's just a legacy system that doesn't fit well with a new method they've come up with. We knew it'd take time, but there are apps out there and they run really nice with Direct2D.

I can confirm this. I've written some GDI apps for Windows, and primitive drawing operations are definitely slow under Windows 7 than XP.

Not all unmanaged programs use GDI, there are a few that use Direct2D. As a guess most of them are retaining pure GDI mode just for backwards compatibility with XP, until it officially dies off anyway.

There's another aspect you're not taking into account. Direct2D is horrible to use from C.

@~Johnny, is it Wave 4 of Live Essentials that you are saying uses Direct2D? Where has MS published this? Btw unfamiliarity with Direct2D also means that most developers still continue to write apps that use good old GDI on Windows 7. Just XP market share reducing won't make developers start writing D2D apps.

There's another aspect you're not taking into account. Direct2D is horrible to use from C.

I dunno, I've had a pretty easy time with it in C++. Very well documented on MSDN. Plus you can mix and match GDI with Direct2D, also well documented on MSDN. Of course there's a learning curve, always is with the new and improved API's.

A tasty snippet for you:taken...)

With all of the operations that GDI+ added, though, there was no hardware acceleration support for the operations that it performed.

It's funny how they complain about how GDI rasterizes in on the CPU, and Direct2D has the advantage of doing it using the GPU, but Silverlight on Windows Phone does it on the CPU too which is one of the main CPU bottlenecks on the app platform there :/

It may render imperceptibly slower. BUT on screen for the user windows 7 performs faster and smoother. And that's the important part. The user doesn't care that some rendering they don't see or notice because it happens so fast anyway is slower..

Does DW/D2D really fix anything though?

I have two applications that use D2D: Firefox and IE9.

I have one I am aware of that uses DW: Steam.

Steam is a slow pile of bleep, I see its border shadow and then some time later I see the application draw its own GUI.

Firefox draws its GUI really slowly too, I mean disabling Direct2D actually decreases the time Firefox takes to draw its GUI and before that I either see a white box or a black one.

Both are large, heavily use applications - both suck at GUI rendering speed.

Firefox draws its GUI really slowly too, I mean disabling Direct2D actually decreases the time Firefox takes to draw its GUI and before that I either see a white box or a black one. Both are large, heavily use applications - both suck at GUI rendering speed.

Driver issues maybe? Firefox with D2D enabled is blazing fast on my systems. No stray boxes, no slow GUI, nada. It's fast across the board, and my system is just a healthy "mid-range" setup, nothing fancy.

It is an interesting tidbit, but at the end of the day, it doesn't make a difference for most users. I've never had to switch between controls so rapidly, and the window lag has no effect on functionality.

I did this same Window resize test in Google Chrome on Mac OS X, and it is the same thing (white area, instead of black). Honestly I would have never noticed if it wasn't for this video, I never find myself rapidly resizing windows all the time.

Driver issues maybe? Firefox with D2D enabled is blazing fast on my systems. No stray boxes, no slow GUI, nada. It's fast across the board, and my system is just a healthy "mid-range" setup, nothing fancy.

That would imply that no single driver release for the past year, either from NVIDIA or AMD, have proper ION or Radeon 4250M support for Windows 7....

This thread should be composed of people who have CPUs weak enough to notice the GUI lagg on W7.

EDIT: I keep forgetting, but those retard-animations that Windows 7 has mask the problem entirely.

I did this same Window resize test in Google Chrome on Mac OS X, and it is the same thing (white area, instead of black). Honestly I would have never noticed if it wasn't for this video, I never find myself rapidly resizing windows all the time.

I get the white screen too on Windows 7 - However I don't tend to resize windows much, They're usually always maximised or a size that I don't need to resize

Tom's Hardware had written their own 2D benchmark for this called Tom 2D: http://dld.tomshardw.../4eb28f57/59803 but it's very sensitive so it must be run on a clean XP and 7 system. Read their articles first before running the benchmark.

This topic is now closed to further replies.
  • Posts

    • Ooooh! Two editorial from Paul Hill on the same day! Is it my birthday or something? 😉 Okay, let's see if I get it right. SearXNG develops a meta-search engine app. Individuals install it on their relays. Users connect to these relays to have their own identity-stripping meta-search engine instead of relying on DuckDuckGo. And some of these volunteers have listed their SearXNG instances on SearX.space. That was a lot of wrap my head around. I hope I haven't missed anything.
    • You sound like some Ukrainians in Crimea before 2014: "I didn't vote for USSR disbanding - I want Ukraine to be part of Russia again" 🤣
    • Uninstalr 3.1 by Razvan Serea Introducing Uninstalr: Easy to use and very accurate software uninstaller for Windows. It can uninstall multiple apps at the same time and we think it’s pretty cool. Developed with expertise by Macecraft Software - the minds behind jv16 PowerTools. Key Features Batch uninstall many apps at the same time. Supports unattended uninstallation of apps. Supports monitoring of new software installations. Also detects portable apps and previously uninstalled software leftovers. Shows all the data added to your system by installed software on a file by file basis. Shows all the data it will remove before starting the uninstallation. Filter and search the list of installed software. According to our benchmark, Uninstalr is the most accurate software uninstaller by leaving the least amount of leftovers when uninstalling apps. Supports detection and uninstallation of Microsoft Store, Steam, Big Fish Game System, Chocolatey, NuGet and Ninite installed software. Supports Windows Dark Mode. Supports Windows 11, 10, 8 and 7. Comes with these translations builtin: Chinese Simplified, Chinese Traditional, Czech, Danish, English, Filipino, Finnish, French, German, Greek, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Romanian, Slovak, Spanish, Swedish, Thai, Turkish, Ukrainian and Vietnamese. Has a single executable file portable version and a normal setup version. Uninstalr is freeware, lightweight and easy to use. No bells and whistles, no nonsense. Uninstalr’s custom uninstallation engine has a dedicated support for the detection and uninstallation of 15 types of apps: Normal Windows apps Microsoft Store apps Portable apps Chocolatey apps Ninite apps PortableApps.com apps Steam games EA App games Epic Games Store games Riot platform games GOG Galaxy games WarGaming.net games Battle.net games itch.io games Big Fish platform games Uninstalr 3.1 changelog: Key Changes Uninstalr now starts and shows the list of installed apps faster after the initial scan has been completed, and with much smaller memory usage. Uninstalr now detects and highlights apps that automatically start with Windows. Greatly improved the detection of portable apps. Improvements New feature: Uninstalr now detects and highlights apps that automatically start with Windows. New feature: Uninstalr now highlights possible leftovers and apps from Russia and China. This can be disabled from the Settings. New feature: A new filter that allows you to show only software that is installed to other than the system drive. New feature: Users can now select to always do the deepest and the most accurate scan for installed apps, at the cost of the analysis taking a longer time. Greatly improved the detection of portable apps, such as added dedicated support for MiTeC, EZ Tools and SysInternals tools. Improved support for portable apps installed via Windows System Control Center (WSCC). NirSoft portable apps are now listed with "NirSoft" prefix for easier identification. Improved the speed of uninstalling apps. The main installed software listing search will now find "Xbox GameBar" if you search for "Game bar" and vice versa. The tooltip now displays more detailed information of the installed apps, such as its registry key and uninstaller path. The links in the About section now look more like clickable links. The main menu is now more clearly indicated in the main user interface. Microsoft Teams Meeting Add-in for Microsoft Office ships with some Windows 11 installations and is now considered a builtin Windows app and only listed if builtin Windows apps filter is enabled. Added a Help button to the main user interface that opens the help section of the website. Added an option not to close Uninstalr after uninstallation. If you open the Uninstalr website from the app, the website now receives the version number of your current Uninstalr version and warns you if you are using anything but the latest version. Improved the accuracy of the New Software Monitor. Improved confirmation messages for Steam and other platform related uninstalls. Improved the uninstallation performance of Steam games. Fixes: Known bug fixed: Some installed app names are capitalized incorrectly, such as "CCleaner Portable" is listed as "ccleaner portable". Known bug fixed: Some apps can be listed twice, for example, Smart Defrag can be listed once as Smart Defrag and then Smart Defrag Home. Known bug fixed: On the pre-uninstallation screen, the Scripts checkbox can be checked by default on Dark Mode but not on the normal mode. Known bug fixed: Perform Deep Analysis can be started only by clicking the button, not via the Right Click menu, main menu or F4 keyboard shortcut. Muse Hub could be incorrectly listed as Adobe Muse. SyncTrayzor was incorrectly detected as two unrelated software, SyncTrayzor and Syncthing. Smart Defrag was incorrectly listed twice as Smart Defrag 11 and Smart Defrag Home. It was possible to enter non-printable characters to the search input boxes of the main screen, and the path listing screen, which caused the UI to look funny. Changing the translation from Settings, especially many times in a row, caused the UI to distort. If you had multiple instances of portable apps on your system, such as the 64b and 32b versions of the same portable app, typically only one of them was detected, not both. In some very rare cases, Uninstalr UI could start with random characters in its search input boxes, which could make the UI look rather confusing. This was a rare issue, only reported by two users. The pre-uninstallation screen could display non-existing paths for example as the software's installation directory or main exe file. This was a cosmetic issue. New Software Monitor cannot detect the installation of Claude. Selecting all the found software made the UI look funny with the top panel covering everything else (because the names of all the selected software were listed there). Sometimes a Steam game could be listed a normal app instead of a Steam game. If the system restart after an uninstallation is delayed, e.g. because of Windows Updates being installed, this additional delay is incorrectly added to the time how long the uninstallation process took. This cosmetic bug could cause the program incorrectly report an uninstallation time longer than the actual uninstallation time. Uninstalling Minecraft could simply fail. The Only scan the system drive for installed apps setting does not fully work. If some apps are installed to a non system drive and this setting is enabled, the app could still be detected and listed on the main user interface. Changing any settings could also incorrectly alter the Only Scan The System Drive For Installed Apps setting. Microsoft OneDrive and Copilot are not always detected. If you enter something to the search filter field, then select the text and press the Delete key, this triggers the Uninstall button click even if your intent was to delete the text input. If you press the F5 key to refresh the screen during the uninstallation loading screen, the program will crash. If you enabled some setting, such as "Do not analyze installed app installation sizes", it could automatically be unchecked later. Uninstalr doesn't warn you if you try to remove Fortec antivirus. There should be a warning if user attempts to remove any antivirus or antimalware type program. Such programs should not be uninstalled using a third party uninstaller, as they are typically protected against automated uninstallation, for security reasons. With "Do not analyze installed app installation sizes" option checked from the Settings, Uninstalr could still display some installation size related elements in the UI which was confusing. The "Only scan the system drive" option moved under Improve Scan Speed from the General settings. If two software have the exact same name and version number, selecting both of them for uninstallation fails because only one is actually selected. Sorting the installed apps by size sometimes fails and the order is incorrect. The "Don't show which paths are currently analyzed" did not work correctly - some parts of the UI still show the currently analyzed path with this setting checked. The "Don't list software less than 10 MB" filter did not work correctly - some apps smaller than 10 MB could still be listed. Uninstalr could start very quickly and display an empty list of detected apps. Restarting the app usually fixed the issue and the list of installed apps was properly displayed. If you placed portable Uninstalr to a same folder with other portable apps, those were not detected because Uninstalr automatically added its installation folder to the ignore list. When trying to uninstall some specific software, Uninstalr could get stuck on the Searching for more data relating to the app phase. Uninstalr could sometimes do a silent uninstallation even if user had unchecked the Perform a silent uninstallation option. Known issues: Uninstalr can fail to run with an Out Of Memory error in systems that have a lot of installed apps. Using the New Software Monitor tool multiple times during one session can cause the program to get stuck on the Scanning stage. The "uninstallation completed" message box sometimes closes when the user moves the mouse cursor over the button before user clicks it. There is no feedback for the user after Fix Information feature has been used. The Right Click menu's Select by publisher option can display the number of apps per each publisher without correct vertical alignment. The default user interface might not display all of the found installed apps if you have over 600 installed apps. If you do, using the Screen Reader Compatible Interface solves the issue. Leftover apptype filter checkbox is shown in red font only in Dark Mode. Clicking the app's icon from the Windows Taskbar doesn't minimize/restore the app like other apps. The warning about an app that user wishes to uninstall being related to some other app user did not select can sometimes be inaccurate. If app's language is changed without restarting Uninstalr, the list of installed software might not automatically refresh. When software is being uninstalled, the UI can say it is processing paths unrelating to the uninstalled app. This is purely cosmetic and does not mean these paths are removed. Uninstalr might not properly detect and/or uninstall Steam games if they are installed to a drive different than Steam's default location in C:\. You might see "This action is only valid for products that are currently installed" error message from Windows Installer during uninstallation. This is a cosmetic issue. Download: Uninstalr 3.1 | 7.1 MB (Free, paid version available) Download: Uninstalr Setup 3.1 View: Uninstalr Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • I and many others did not vote to get out of the E.u because of Putin or Farage, we did so for our own reasons. You don't have to tel me what my own did or did not do when it comes to the E.U. The EEC is or was the European Economic Community, a different beast to what the E.U is now.The EEC was a mainly about trading, the E.U have gone far beyond that and as I have said before, is now more of a United States of Europe. The U.K did not vote to join a United States of Europe. Anyway, they did not want us in there in the first place, Charles de Gaulle stopped us joining as he claimed we didn’t agree with the core ideas of integration. He was not wrong and that is why we voted out of the E.U when the time came. I was not old enough to vote the first time. My only regret is that we did not have the referendum years ago and got out years ago. If we rejoined, we would have to agree to join the Euro and no doubt Schengen, agree with freedom of movement, we have enough problem with people coming over here as it is. i have no problem with people coming over here if they work and don't try to push their way of life onto us. The E.U has a currency, freedom of movement, an anthem a flag, a parliament, well they are there, not sure if they do anything. Don't sound like something that is just for trading. Oh yeah, also wanted a euro Army. How many stupid rules have the E.U made that we had to follow? I doubt I will see the Uk rejoin the E.U, which suits me. Oh yeah, my partner is Polish, she came over here before Poland joined the E.U and she got fed up of people just coming over here with ease, while she had to struggle. She is now a British citizen and have been for a fair few years
    • Hello, Paul. Thanks for the editorial. It was interesting. I'm going research more into the app and its concept. Of course, if you know me at all, you know that I'd say your articles needs some editing! I always do, don't I? For instance, the article occasionally mentions relays before defining it.
  • Recent Achievements

    • Week One Done
      flexorcist earned a badge
      Week One Done
    • One Month Later
      Woland13 earned a badge
      One Month Later
    • Week One Done
      Woland13 earned a badge
      Week One Done
    • One Year In
      bernmeister earned a badge
      One Year In
    • Week One Done
      Scoobystu earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      495
    2. 2
      +Edouard
      226
    3. 3
      PsYcHoKiLLa
      153
    4. 4
      Steven P.
      75
    5. 5
      FloatingFatMan
      71
  • Tell a friend

    Love Neowin? Tell a friend!