Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Quickly free memory used by Dashboard widgets System
If you only use Dashboard on rare occasions, and don't want all those widgets to stay running forever, try the following AppleScript:
tell application "Dock"
  quit
  launch
end tell
This will relaunch the Dock and, since all the Dashboard widgets are subprocesses of the dock, they will be closed. Widgets will stay closed until Dashboard is invoked again.

[robg adds: This is a handy way to quickly free up the RAM used by open Dashboard widgets. Run it, and the RAM is released. Press F12 again after that, and you'll see that your open Widgets are all still open (you'll just have to wait through that slight delay as Dashboard 'activates' them again). If you're interested in permanently disabling Dashboard, then you want this hint instead.]
    •    
  • Currently 3.00 / 5
  You rated: 5 / 5 (4 votes cast)
 
[24,714 views]  

10.4: Quickly free memory used by Dashboard widgets | 14 comments | Create New Account
Click here to return to the '10.4: Quickly free memory used by Dashboard widgets' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Quickly free memory used by Dashboard widgets
Authored by: RussellK on Mar 09, '07 08:06:06AM

Is this the same as relaunching the Finder via the Force Quit Applications dialogue (option-apple-Esc)?



[ Reply to This | # ]
10.4: Quickly free memory used by Dashboard widgets
Authored by: kainewynd2 on Mar 09, '07 08:15:01AM

No. The Dock is a separate application.



[ Reply to This | # ]
10.4: Quickly free memory used by Dashboard widgets
Authored by: adrianm on Mar 09, '07 08:35:57AM
You don't need the launch command. The dock re-launches by itself. The script can simply be:

tell application "Dock" to quit

---
~/.sig: not found

[ Reply to This | # ]

10.4: Quickly free memory used by Dashboard widgets
Authored by: mono toto on Mar 09, '07 08:46:31AM
Another way is to keep the stop dashboard widget on your dash.

http://www.natal.be/index.php/2005/10/stopdashboard-widget/

[ Reply to This | # ]
10.4: Quickly free memory used by Dashboard widgets
Authored by: kiltbear on Mar 09, '07 12:17:59PM
I use Dashlite to do the same/similar thing.

[ Reply to This | # ]
10.4: Quickly free memory used by Dashboard widgets
Authored by: digitalcowboy on Mar 09, '07 02:01:59PM
I use MultiDash to do the same thing.

I'm out of control with widgets because there are so many that I find useful. I use MultiDash to switch between a handful of pre-sorted sets. I have a little over a dozen in my Development set for work, for instance (UNIX timestamp converter, MD5 hash engine and lookup, byte calculator, Regex toolbox, binary/hex/dec conversion etc.).

MultiDash switches between sets, in part, by killing the Dock. So I've just gotten in the habit of "switching" to the current set when I'm done for the moment so that none of them are ever running until I need them.

---


[ Reply to This | # ]

10.4: Quickly free memory used by Dashboard widgets
Authored by: wordsofwisedumb on Mar 09, '07 04:11:41PM

In Terminal: killall Dock



[ Reply to This | # ]
10.4: Quickly free memory used by Dashboard widgets
Authored by: interlard on Mar 09, '07 04:45:28PM

I have the opposite problem: few widgets, oodles of RAM and I hate the delay while the Dashboard starts up its widgets. If I had wanted to wait that long, I'd have loaded a web page.

Any ideas; you lovely cleaver people, you?



[ Reply to This | # ]
10.4: Quickly free memory used by Dashboard widgets
Authored by: Unsoluble on Mar 09, '07 06:05:25PM

Open it once when you log in, then enjoy it being instantaneous from then on?



[ Reply to This | # ]
10.4: Quickly free memory used by Dashboard widgets
Authored by: mmmark1 on Mar 10, '07 08:18:19PM
I have the same situation, and I love Quickstart. It automatically starts the dashboard anytime you start up the computer or come out of sleep. Check it out here: http://www.alwintroost.nl/content/widgets/dashboardkickstart.xml

[ Reply to This | # ]
10.4: Quickly free memory used by Dashboard widgets
Authored by: FG on Jul 22, '07 11:37:46PM

I've written a quick and dirty applescript to do that:

try
tell application "System Events" to key code 111 --F12
end try

delay 1

try
tell application "System Events" to key code 111
end try

Basically, this script presses twice the key F12 with one second delay: it needs, obviously, that you haven't changed the shortcut to Dashboard, and that you have enabled access for assistive devices (in the Universal Access Preference Pane). Paste it in Script Editor, save it as an application and add this application to your login item, and voilĂ ! Surely there must be a much clever and gracious way to accomplish that, but I'm a basic applescript user…



[ Reply to This | # ]
10.4: Quickly free memory used by Dashboard widgets
Authored by: Brian G. on Mar 09, '07 05:39:12PM

The way that OS X manages memory, all you're doing with this hint is wasting time. Well behaved widgets will stop processing and all of their memory will eventually be swapped to disk.

Widgets are supposed to be out of sight, out of mind... literally in this case.

Brian G.



[ Reply to This | # ]
10.4: Quickly free memory used by Dashboard widgets
Authored by: Seth Milliken on Mar 10, '07 04:50:00PM

This is not a waste of time. Not all widgets are well-behaved. Widget memory leaks create real performance problems. Swapping isn't free. Restarting the Dock does address this problem.



[ Reply to This | # ]
Easy to use with a Quicksilver trigger
Authored by: jvr on Mar 13, '07 11:28:52AM

Thanks for sharing. I like to use some widgets occassionally, but I don't like to keep them running all the time. Because of all the memory-intensive apps I run, I try to keep paging to a minimum, too.

I saved this script as an application and set up a Quicksilver trigger for it. Now, I just hit F12 to launch Dashboard, and Ctrl-Cmd-F12 when I'm ready to kill it.



[ Reply to This | # ]