grack.com

Blog

.NET Desktop Apps - Slow & Bloated

I’ve got a couple of .NET desktop apps running on my work system (with a gig of RAM nonetheless) and it seems like they are always the applications that are sucking up the most memory.

I run Sharpreader at work for a couple of interesting feeds and it hovers around 70MB when open!  Minimizing it seems to reduce the working set to 2MB, but it’s still using 69MB of virtual memory while sitting there.

A GUI monitoring tool that I wrote for Draco.NET seems to take up 30MB (plus 30MB of swap) all the time while it’s sitting in the taskbar.  It’s basically just a WinForms app that calls a remoting service - no fancy tricks.

We seem to be at the same place with .NET apps now that we were with Java apps five years ago - they hog tons of memory. 

Is there any way to get your apps to run leaner?  Heck, the AVG anti-virus console on my home computer uses 2MB of total RAM.  That’s physical + virtual.

For now, I’m questioning the usage of .NET for any application that normally runs in the background.  I’m not sure that 60MB for a simple monitoring app is a good call.

Fixing Firefox Winstripe Spacing

All my readers, please note that this is constructive criticism (as well as a fix!) for the new theme, not an emotional rant or complaint.  Ben Goodger has done an awesome job in getting Firefox ready for 0.9.

The first time I fired up Firefox 0.9, I wasn’t too happy with the new, default Firefox theme.  However, It turns out that it mostly the awkward spacing that was making the icons look out-of-place.  As strange as it seems, reducing the spacing makes the entire theme look a lot better.

I managed to reduce the spacing on the toolbar buttons by hacking the skin chrome.  You’ll need to place this in a file named “userChrome.css” under your Mozilla\Firefox\Profiles\profile\chrome directory.

.toolbarbutton-1, 
.toolbarbutton-menubutton-button 
{ padding: 3px !important; }

.toolbarbutton-1[checked="true"], 
.toolbarbutton-1[open="true"], 
.toolbarbutton-menubutton-button[checked="true"], 
.toolbarbutton-menubutton-button[open="true"] 
{ padding: 4px 2px 2px 4px !important; }

Here’s the shot from before (with awkward spacing):

And after tightening up the spacing a bit:

Looks much better to me - not a huge change, but enough to make me feel more comfortable with it.

Big Flames Game Tonite

The underdog team has made it to game 7 of the finals.  “Flames fever” has pretty much devoured the city.

We’re in for a game tonite.

Source Control for the 21st Century

Having been using CVS for the last four years in a commercial environment, I’m certainly pretty comfortable with it.  Branching and merging is tricky (sometimes painful) as usual, but losing file history on rename is a killer.  WinCVS has been the gravy on top that keeps us using CVS.  Anyone who might have had the misfortune of trying to work with command-line rcs or cvs knows how much more productive a GUI makes things.

I’ve been evaluating alternatives in the next generation of free SCC applications.  Given the above issues I’ve had with CVS, my requirements are:

  • Supports directory/file renaming with file history saving
  • Supports common-ancestor file merging (ie: multiple merges to a branch won’t conflict)
  • Has a reasonably good GUI to support 90% of the CLI functionality

My “nice-to-haves” would be:

  • Visual Studio integration
  • Conflict resolution via “three-file method” (file.mine, file.other, file.ancestor) versus embedded conflict markers (CVS-style >>>>>> and <<<<<< markers)
  • Easy on-line backup capability (for any SCC system running off a database)

I’m crossing my fingers waiting for Subversion to support the multiple-merge support.  It feels like the project with the most elegant and future-proof design.  It certainly is a pain to get up and running on some older RedHat distributions (db4 and Apache 2.0 requirements).