uɐʎɹ ррoʇ uɐʎɹ bio photo

uɐʎɹ ррoʇ uɐʎɹ

Hello. Is is me you're looking for?
僕は猿ーロボット。
robotic life signs.
makes noise, hears sounds, intafon.
affe auf deux roues.

Email Github Github Gist Last.fm Soundcloud Flickr

All I have to say is “Wow!” What a leak! I was working today on, well, what I work on at work, which is mainly javascript programming for the VMware WebAccess product, which allows for management of hosted virtual machines for the VMware ESX and Server products. Part of our process is to weed out memory leaks in the code, as there are a good number of objects being created and removed in any particular session.

Interestingly enough, this doesn’t seem to be on the minds of many javascript developers, and, since the OSX dashboard practically invites anyone with a nifty idea into the fray, there are bound to be some interesting issues. A couple of days ago I was doing laundry, and had used one of the downloadable timer widgets to remind me of when my laundry loads would be done. I used this widget about 4 times.

Today, a few days later, I was running several things at once, and also launched a new build of the VMware Fusion product, which has been getting slimmer and snappier for months now. However, today, as it turned out coincidentally, my system began to crawl. I wanted to check and make sure I hadn’t downloaded a debugging build, so I first opened up Activity Monitor to check out what processes were doing what. As it turned out, the little timer widget that I had used 3 days ago was duking it out with the rest of the system. Activity Monitor was reporting that this little javascript app was eating up 65% of my CPU cycles! Not sure what the lessons here are, other than:

  1. If you develop widgets for the OSX dashboard, make sure that you clean up after yourself.
  2. If you use widgets for the OSX dashboard, you may want to periodically check your active dashboard widgets in the Activity Monitor. All testing for the widgets are ostensibly done by the developers, and Apple’s criteria for accepting new widgets for distribution on their site does not include stringent testing for memory or process management.