Monday, September 11, 2006

More Software Efficiency Shout-Outs

I wrote a small comment on Mark Shuttleworth's blog in response to the furthered Ubuntu development of XGL/desktop effects/compviz, etc. 

While I think those are neat in terms of getting more popular acceptance of Linux, maybe the thing to do is focus on the "green" ness of Linux, instead of developments that make it less green.

Anyway, the purpose of this post is I wanted to give a shout-out to software developers that might be wasting cycles. 

The requirement is, this is something about the runtime that isn't constantly needed, but is costing overhead all the time.  Obviously if you're playing a game, or doing number crunching, or scanning your disk for a document, then you'll need the power you can get.  What I'm looking for are things that have needless overhead.  For the most part, I'm throwing these out for discussion, I don't have hard numbers (the exception is Vista).

  • Windows Vista Aero.  I called this one out on Shuttleworth's blog specifically because I've actually measured the effect of running Vista.  It uses an extra 20w at idle over XP on my machine when running Aero just because the GPU is fired up and running its fan.
  • MacOS X UI.  See Windows Vista Aero.  There's really no way to measure what kind of power the UI is using, since there is no mode for OS X where the fancy effects are not active, I think (I'm not a Mac user).  But I think it also uses the GPU for its fancy effects, so mark this one down.
  • MacOS X - Objective-C.  Again, I'm not a Mac user, but I was a NeXT user, so maybe someone can clear this up for me.  When I was using MacOS X a few years ago,  Objective-C's pre-binding, late-binding, all kinds of binding takes a lot of cycles compared to C++ or C apps written in Carbon.  Should this be on the list?
  • Java and .NET.  I wonder how much we are spending by having these languages be interpreted by the CLR/JVM instead of compiling them to machine-native code with a garbage collector?  The JITting has become really amazing for both of these.. the performance is really good.  But it still makes me curious.
  • Bittorrent.  People leave their computers on all the time to try to make a download faster when, if it's legal material, they can probably get it from a fast download site somewhere.  Conceptually, I like Torrent in terms of network traffic.  However, it's probably incredibly inefficient when you take into account all of the computers, routers, switches, fiber, etc.
  • PDF.  I'd be curious to hear more about PDF vs. HTML for a lot of documents.  I get sent PDFs all the time when it probably doesn't demand that much.
  • XML.  Is really wordy and people are using it inefficiently out there in the world.   It's being used for all kinds of data storage that should really use a SQL database or just plain old text files.  I wonder how much XML is contributing to wasted cycles out there, just because people are too lazy to use a SQL database.
  •  Object-Relational Mapping.  Speaking of that, how about ORM instead of just coding your own SQL queries in a DAL?  ORM seems very inefficient in the automated/no-coding ways that are out there (like ActiveRecord), compared to coding up your own queries (well, when the queries are complex, of course -- but who knows how many people using Hibernate to handle everything about their large JOIN code?).

Just a few that I could think of.  Post more into the comments, or feel free to refute some of these.  The goal isn't to get people pissed off.  The goal is to get people asking whether we should pay more attention to efficiency in software as a green practice.

No comments: