May
5
Dashboard Widgets can be CPU-Aggressive
Filed under: Uncategorized. Tags: 10.4-tiger.
I just installed the Dasher pref. pane, to pull up Dashboard after a couple of minutes of inactivity - instead of a screensaver.
Activity Monitor is running in the background, and while walking by, I noticed the CPU was pegged. I opened the detail view, and it listed 4 dashboard widgets as taking 10-15% CPU each. The widget was “World Clock” - 15% of a 1GHz CPU to render an analog clock? There’s gotta be something wrong there… I know it’s using the cool new WebKit draw dealie, but 15% seems a bit excessive. I could write Shockwave stuff that uses less…
Nevertheless, the eye candy is worth it… Behold 45% CPU activity, in 4 widget instances:

Update: Woah. I just checked Activity Monitor, because my system was feeling like it was stuck in VM thrash hell (with a gig of ram, that shouldn’t be happening). I sorted by “real memory” usage - and each of the Dashboard widgets is filling around 90MB of RAM! And between 250MB - 500MB of virtual memory! There’s gotta be something wrong here, because that’s rather obscene memory usage for a little analog clock, even if it is shiny…
Comments
3 Responses to “Dashboard Widgets can be CPU-Aggressive”
Leave a Reply


I just found this out after an upgrade .. what a collossal waste of cpu .. I guess they count the microseconds in a for loop or something
I was shocked to notice that as well - thats why i switched to another clock widget which spends only.. 15% of the cpu instead of 20
The situation gets worse the longer World Clock is left up and running. I left a single instance going for about 2 weeks and found it had eaten 46% of the CPU. I’m currently conducting a more scientific experiment, taking performance snapshots every hour using a cron task and the “ps” command to snapshot all the active widgets. What I’m finding is World Clock eats an additional 1% of CPU each hour it’s active and more RAM as well. I’m trying to leave the Dashboard up and running on the system as long as possible, in the hope of accumulating enough performance data to convince Apple that they’ve got a real problem in that widget since people really like to use it they generally can’t afford to lose 46% of their CPU… See the latest data at http://mikesalsbury.com/mambo/content/view/238/1/