I just updated my post The Bloated World of Managed Code with baseline memory footprints for Console and Winforms apps in .NET 2.0.
I'll admit I am a bit of a hypocrite when it comes to managed code apps. Now that tiny, native BitTorrent clients are available such as uTorrent and BitComet, I just can't force myself to suffer through the Java (Azeureus) and Python (ABC) clients. They're nice enough, but I want small, clean and fast for this kind of app. And where's the .NET BitTorrent client, anyway?
Managed code can be plenty fast, but I've always said that managed code isn't appropriate for every kind of application. It's another tool in your toolbox, but not the only one.
One particularly egregious example of managed code misuse, however, is in ATI's Catalyst video card drivers. The "control center" is a client app which allows you to manipulate the settings. It's written in .NET 1.1 and launched via a button in the graphics driver tab.
It's a reasonable concept, but in practice-- it sucks. Even on a clean Pentium 4 3.2 machine with 1gb of RAM, loading the control center for the first time feels like almost a full minute of waiting for something to happen. As commenters on Junfeng Zhang's log point out, this is likely due more to poor coding than anything else. But what really irks me is that all I want to do is adjust a few minor video card settings. Is it really appropriate to have such a heavyweight app for such a simple task?
Which brings me back to using managed code in appropriate places. Although there was a bit of a hubbub about managed code and Vista last year, Microsoft is pursuing managed code aggressively, as Dan Fernandez notes in Debunking the Microsoft's not using Manged Code Myth. He provides a succinct list of recent Microsoft products and the number of lines of managed code in each one:
Managed code is great. But a world where everything is managed code-- including the operating system and essential utilities-- is still pretty far off.
Posted by Jeff Atwood View blog reactions
« Flattening Arrow Code Regex Performance »
"Managed code is great. But a world where everything is managed code-- including the operating system and essential utilities-- is still pretty far off."
You're probably right. And this isn't helped by the problem that end-users don't care whether their code is managed or not. Nor should they care if it's written in assembler, Java, Python, or C#. For every developer bloviating and chattering excitedly about the promise of managed code (and make no mistake, it's going to be great when we eventually go managed all the way), there's ten end-users who couldn't care less. They just want things to *work*.
Put another way, nobody really needs Notepad.NET with all its bells and whistles when plain old Start > Run > "notepad" still works just fine.
jē on January 12, 2006 03:15 PMYeah, but users also want to stop hearing about vulnerabilities caused by buffer overruns and underruns and sideruns.
It's not impossible with managed code, but much more unlikely. I think any one of us could write a simple little video card control center that would be snappy, performant, and nearly indistinguishable from unmanaged code.
Save the unmanaged code for device drivers and such I say. Microsoft will invest heavily in perf tuning managed code, and we'll get the benefits for free.
Haacked on January 12, 2006 03:57 PM> when plain old Start > Run > "notepad" still works just fine.
For very small values of "fine", perhaps..
http://www.codinghorror.com/blog/archives/000441.html
> Save the unmanaged code for device drivers and such I say
I just wonder if the ATI developers had created a the Catalyst Control Center in C++, would it have been this slow to launch and use?
Jeff Atwood on January 12, 2006 05:11 PMHere is some discussion about the unmanaged DVD Maker in Vista:
<a href="http://blogs.msdn.com/ericgu/archive/2006/01/09/510833.aspx">http://blogs.msdn.com/ericgu/archive/2006/01/09/510833.aspx</a>
I guess Eric isn't allowed to really tell us why it's unmanaged, but we all have an idea.
Uggh... I was thinking that the next video card I bought would be from ATI. I am sick and tired of nVidia's belief that their crappy drivers should be taking over my entire machine. It's a video driver for pete's sake!
But now that you tell me ATI pulled this kind of stunt, maybe I'm better off sticking with nVidia. How stupid do these people have to be? Requiring .NET for a video driver? Especially when .NET typically ISN'T installed on the OS by the time you install the video driver. What do they do then?
I'm a huge fan of .NET and even Java for enterprise applications. But it is becoming quite apparent to me that .NET isn't the technology that you use for consumer applets like this.
matt on January 12, 2006 08:35 PMmatt,
ATI's Control Centre is an optional add-on to the standard driver which already has the usual dozens of settings.
Perhaps if you have spec-i-a-l-i-st needs for gaming or CAD or some such you might need it, but I am happily using my computer for DVD playback, calibrated photo editing and 3D rendering and have so far had no need of it.
BTW Jeff: You have a 'questionable content' filter that rejects the word "spec-i-a-l-i-st".
Paul Coddington on January 12, 2006 11:31 PMAs of the latest Catalyst driver version, the Control Center is mandatory, as they removed the probably-written-in-C++ control applet.
I've been avoiding the CC like the plague, but now it's on machine, sucking about 14 megs of memory for no real reason.
And why does it launch so many CLI.exe instances?
Oh, and it doesn't work with .NET 2.0.
foobar on January 13, 2006 01:33 AMOne thing that always seems to be missed out of the "Microsoft using .NET internally" lists is the Windows Media Center shell "ehome.exe" which is currently .NET 1.1. The first version (MCE 2004) was .NET 1.0. I'm sure all the swishy graphics etc are probably C++ GDI code but the main engine is .NET. In fact people are hacking ehome using ILASM/ILDASM in order to get the Media Center shell running on Windows XP Pro or Windows Server 2003. See: <a href="http://www.thegreenbutton.com/community/shwmessage.aspx?ForumID=27&MessageID=78447">http://www.thegreenbutton.com/community/shwmessage.aspx?ForumID=27&MessageID=78447</a>
Duncan Smart on January 13, 2006 05:39 AM"Oh, and it doesn't work with .NET 2.0."
This seems to be one of the biggest issues. I wonder if Microsoft has determined that this is a deal breaker for using .NET within key components of the Vista OS?
I don't think that you can get around this issue when dealing with managed environments. Java suffers from this problem as well. In a recent post to a popular Java forum, someone asked "how many different versions of the Java VM do you have on your machine?". The typical response was around 5 or more. This does not include Java appications that attempt to package a specific version of the VM locally into the application directory.
I wonder if .NET will suffer the same fate? Will every user eventually have version 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, and 4.0 of the .NET framework installed on their machines?
matt on January 13, 2006 10:22 AMOffhand, I'm going to guess the only reason it doesn't work with 2.0 is that they didn't add a .config file saying it's allowed to try. 2.0 is supposed to be fully backwards-compatible...
c on January 13, 2006 10:46 AMObviously, the ATI folks picked the wrong Development language to develop the app (or thier code suffers from a lot of inefficiencies), or thier test machines were dual processor pentium xeno machines and they never noticed the app start up time.
Anyway, .NET is a great development environment but it's not the be all end all. If I'm developing a missile guidance system, chances are the development language will be C or Assembly, not .Net. Lower level (unmanaged) languages have purpose, especially with systems that need to do heavy processing at real time and need to be close to the hardware. Most applications do not have to be close to the hardware (DB, business app), so .NET is a good choice.
I love this topic. I was going to post something like this on my own Blog.
I cannot agree more with this topic. The ATI catalyst app is HORRIBLE. It takes a good 2 minutes for that POS to come up on my 1gb AMD64 3200 box. It uses memory like its going out of style!
Is this what all managed apps are like?
Armen on January 13, 2006 04:49 PM> Is this what all managed apps are like?
Nope. Discreet Cleaner XL is managed code, loads very quickly and uses (relatively) little memory.
I just think the ATI guys don't know what the hell they're doing.
foobar on January 13, 2006 06:20 PMI was actually just trashing Catalyst online with a buddy of mine the other day; the biggest issue we had was "why" would they write it in managed code? Just to say "hey, we wrote it in managed code?" More than likely yes, as this type of app has no business being written in anything but VC++, reason being is that it probably makes a gazillion p/invoke/external/interop calls on startup, and doing that from .Net takes many more cycles then just calling stuff natively from C++. I hate it too, and I also hate that when I upgrade it, all my previous settings are set back to defaults. Silly ATI developers...they need to stick to what they do best, and that's cranking out kickass video cards.
jayson knight on January 13, 2006 07:12 PMI'm withdrawing my earlier comments having just discovered that with the latest version of Catalyst the new control centre is no longer an optional extra (they obviously kept the old dialogs in parallel for a while before dropping them).
Yes, this is HORRIBLE. The whole interface design is amateurish, the programmer equivalent of a child with writing word documents with too many fonts, or Homer Simpson's web page. Bad graphics used to excess, even in the selection tree.
Particularly careless is stretching the standard display dialog to another inch of blank space making the layout of all the other panes ugly just to add a single button. Then in the control centre, they skimp on the selection tree, making it half the width it needs to be so you have to keep scrolling the tree within a peep hole.
Add to this the nonstandard controls, it's a UI disaster.
And that's before you even get to the performance issues.
This is a good example of what you should not do to your customers - suddenly drop your standards so that the criteria they used to choose your product are no longer valid. Talk about having the rug pulled out from under you.
One of the minor details I really hate is the insistance that the phrase ATI CATALYST(R) has to be shoved in your face every where you look. In the feedback, I explained to them that I did not pay thousands for a computer just to admire their trademark. In pratical terms, it is like flashing HTML elements - it makes it hard to scan a context menu for what you are looking for when one item is always shouting "look at me!".
Fortunately, not being a gamer, I can go back to an earlier version.
On the subject of managed code taking over - it has been said that .NET need not be used for everything, yet, the disturbing thought is that MS does not have a product for creating unmanaged code any more (unless C++.NET can do it, but that isn't my field).
Paul Coddington on January 15, 2006 05:41 PMPaul, all recent versions of Visual Studio (2002, 2003, 2005) continue to ship with the Microsoft Visual C++ compiler which continues to produce regular, unmanaged machine code. Only unmanged code generation for Visual Basic was discontinued.
Chris Nahr on January 16, 2006 11:04 AM> I just wonder if the ATI developers had created a the Catalyst Control Center in C++, would it have been this slow to launch and use?
Probably, and it would have the added benefit of crashing with heap corruption and exposing the classic vulnerabilities so often associated with C/C++
Haacked is right. A lot of developers (including myself) could write that thing in C# and you wouldn't be able to tell it from an unmanaged app. I've been writing managed code for almost five years now (I was fortunate enough to work on a new application when the .net EAP started) and when there's that obvious of a performance problem, it's typically not .net, it's the program.
I am using currently using an ATI-based card. I have been satisfied with it until recently.
My next card will most likely be based on an nVidia chip.
The one single reason for me to swith from ATI is the bloat called Catalyst Control Center. Prevsiously I could download the standard control panel but since this is no longer the case ATI lost me and many others as customers.
I am a programmer and I also believe managed code is great, but not in all cases.
I'm really glad I found this thread (and thanks to everyone who contributed a comment). I've been reconfiguring, deleting old programs, optimizing, etc. and only NOW do I know what's causing my PC to boot so slowly. It's the danged Catalyst app. Everything comes up in under a minute, desktop, quicklaunch bar, system tray, then the hard drive runs for another 1 or 2 minutes. I can't really launch an application until the HD activity settles down. Sure enough, lots of CLI.EXE activity. Couple that with McAfee and they've reduced the value of my computer by several hundred bucks! I was ready to go out and get another processor and MB. Nope. Gonna get a new video card instead. Bye Bye ATI....
Greg B. on May 31, 2006 08:20 PMAh, I meant to update this thread, too.
There *is* a way to avoid the bloated Catalyst .NET control panel.
1) Either disable Catalyst at startup, or only install the 'minimal' driver set from ATI which does not include it.
2) Download the ATI Tray Tools:
http://downloads.guru3d.com/download.php?det=733
Now you can control all your video card settings from a nice, lightweight C++ app again. The only settings I ever need to tweak are the AA (anti-aliasing) and AF (anisotropic filtering) related ones.
Jeff Atwood on May 31, 2006 11:13 PMI cannot even run the control center on my Athlon64 3000+ @ 2600MHz it jams up my startup and everything else including Antivirus realtime scanning WILL NOT load at all because of it. This is without a doubt the worst software I have ever seen in my life! I refuse to install it period! It slows down 3DMark scores by about 10% as well but this could be because of the drivers themselves.
5.9 Catalyst for XP 32-bit
5.11 for x64
These are the last drivers that install with Control Panel and are far superior to anything those kids at ATI are pumping out now, I guess ATI knows they're garbage but are commited to them because of the millions of dollars it cost them to get to the level of crappiness that they're at today. Poor poor ATI.
t00nCiNaToR on September 15, 2006 07:00 AM***UPDATE***
I installed the Cat drivers(BETA)on Vista RC1, the total size of the control center is 80.3mb download and 360+mb's installed, the software cannot even recognize my X800 Pro! Impossible to run any 3D apps without complete screen artifacts! WAY TO GO ATI!!! good job!
t00nCiNaToR on September 15, 2006 07:10 AMThanks goodness that I find this page through Google; I was close to format my handdisk and re-install the Win2000 on my PC.
I am a company executive and I always need to switch around in different video modes for doing business presentations. The Catalyst Control Center is a piece of crap. I was very happy with the quick response of the previous ATI control application, until I had had to upgrade the ATI video driver for a new application.
Kevin on December 2, 2006 05:50 AMThanks for your comments, everyone.
A bit of Googling found me an old forum post about how to get rid of the irritating "ATI CATALYST(R) Control Center" option at the top of the context menu. Just run regedit and delete the following key, and it should disappear immediately:
HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\ACE
Fantastic! Hope this helps others too.
Simon Menashy on December 23, 2006 05:46 PMI hate C#... in my mind it exists for only 2 reasons 1) so that apps run **ONLY** on Microsoft OS (that Mono stuff is just garbage and just another Microsoft trap... besides C++ runs on **ANY** OS under the sun) and 2) So Microsoft can **CONTROL** it's own language (that committe thing with C# is just "smoke and mirrors").... **HOWEVER** the reason Catalyst Control Center sucks has NOTHING to do with C# which (other than the fact that I hate it) is a VERY capable language... the reason Catalyst Control Center sucks is that nobody at ATI (now AMD) actually knows how to write code... the company is filled wall-to-wall with politicians (like many big company's) instead of good engineers.
Bill on January 12, 2007 12:26 PMI stopped thinking about CCC and just hope that I never care enough about a setting to want to run it. I always download the driver only distribution.
People have said for a long time that it's not the language, its the coders. They've said that for ages with Java and similiar interpreted languages from Microsoft. My counter to this is I've never used a Java/managed code application that I liked, does real work and is not as slow as crap.
I know of many that worked just fine and actually had a more user friendly look and feel until they were "rewritten" in a new language with memory consumption increasing several times and performance decreasing by the same margin.
Some good examples are in the list above "SQL 2005", "Visual Studio 2005" and of course CCC.
As a consumer I don't care what its written in. I just want it to work and save time not waste it.
A bit late but wanted to say thank you Simon!
What possible reason could there be to add a control center menu item to the Explorer window? It was infuriating for those of us who Alt-F to the New submenu. Then, if you mess up and don't down arrow twice it takes 30 seconds for control center to open before you can shut it down.
This sounds minor but the bigger issue is that programmers need to analyze a feature before just throwing it into the codebase. Especially something as brain dead and useless as the menu item. Really makes you wonder what other goodies are lurking under the hood.
I know this thread is a bit dated but I just spent a day downloading, installing then uninstalling the latest drivers with Catalyst Control Center.
The Control Center is probably a good example of how even the best framework (which I think .NET is) cannot compensate for lack of ability.
I will have to give ATI(AMD?) the benefit of the doubt and believe Control Center must have started life as some 'make work' project for some junior developers?
Sandy, read my comments on January 12, 2007 12:26 PM.
That is the clue why CCC is garbage.
Bill
Well, not only people at ATI do not understand short and elegant code, but they also insist on defacing right click menus all over by adding an item "ATI CATALYST(R) Control Center" at the top of options.
This is also programming horror : hi-jacking the general interface and littering menus is akin to creating malware.
By the way, here is the single item (ACE) to remove with regedit to throw this piece of crap where it belongs : in the garbage bin.
HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\ACE
Haven't you noticed how often harware nowadays comes with crapware ? Especially from China. Probably cultural differences. Or do they dispise so much software that they have teenagers do this on the side ?
| Content (c) 2008 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved. |