Jump to content


Photo

Reclaiming Memory from Dashboard Widgets


  • Please log in to reply
2 replies to this topic

#1 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,043 posts
  • Gender:Male
  • Location:Raytown, MO (outside KC)
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:8.x

Posted 09 March 2007 - 12:53 PM

Many of us don't use the Dashboard regularly, even though we need to sporadically run a widget such as the AccordanceUpdater. One reason is that the first time Dashboard is run, it loads every active widget into memory and it stays there taking up RAM whether you ever bring Dashboard forward again or not.
One thing you can do is only have active the widgets that you really want to use.
And, for those times when you only occasionally use an Accordance widget and then want to free up the RAM that Dashboard is now using, all you have to do is restart the Dock. There's no obvious way to do this, but a one line Applescript will do it:
tell application "Dock" to quit
It quits the Dock which then relaunches quicker than you'll notice anything has happened and the Dashboard no longer hogs any RAM.
Here's a copy of the script you can download and use. Put the script in the Script menu and launch it anytime after you've used the Dashboard. (If you don't know how to use the Applescript menu, simply start by launching the Applescript Utility application and go from there.)

Edited by Joe Weaks, 09 March 2007 - 12:56 PM.

Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#2 Mick Matousek

Mick Matousek

    Silver

  • Active Members
  • PipPipPip
  • 170 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 09 March 2007 - 03:38 PM

Many of us don't use the Dashboard regularly, even though we need to sporadically run a widget such as the AccordanceUpdater. ...........


I'll second that. I like your Applescript. Another easy free one is DashPrefs - http://captire.info/DashPrefs/

#3 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,043 posts
  • Gender:Male
  • Location:Raytown, MO (outside KC)
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:8.x

Posted 09 March 2007 - 06:16 PM

I'll second that. I like your Applescript. Another easy free one is DashPrefs - http://captire.info/DashPrefs/

While, yes, there are lots of options for applets and pref panes for sending the simple:

defaults write com.apple.dashboard mcx-disabled -boolean YES
and
defaults write com.apple.dashboard mcx-disabled -boolean NO

commands to the Unix shell to enable/disable Dashboard, it has since been realized that they are useless and actually a bad idea. It is possible that having Dashboard disabled could create issues with system update installers. But moreso, Dashboard takes up no system resources in RAM or processing power if you haven't yet invoked the Dashboard since the last login. So, disabling it so that it can't be invoked is unnecessary and creates an extra step of first re-enabling Dashboard for those times you may need to use it. Much better is simply restarting the Dock which resets Dashboard as well back to its state of taking up no resources.

IMHO, I'd especially recommend against something like DashPrefs since, ironically, running a Preference Pane Binary to turn the Dashboard on and off to save system resources increases the system resources needed when you launch System Preferences! :)
Plus, it seems to me that in order to launch a single Widget while things are disabled with DashPrefs, the steps would include launch System Preferences, navigate to that pane, then reenable Dashboard; and once you're done with your widget, you go back to preferences and disable Dashboard again, and I'm still not sure if it sends a restart command to the Dock in order to free up currently used RAM.

Edited by Joe Weaks, 09 March 2007 - 06:18 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users