Launching a One-off Script on Mac

Because apparently, consumer applications have gotten very resource hungry when I wasn’t looking

One of the most frustrating things that has started happening to me since I’ve hopped into development is realizing how absolutely heavy work is when you’re using browsers and fully-featured IDEs all day. I used to ssh into things! It used to be a big deal if things I was doing consumed a whole megabyte of memory! Scripts I wrote sometimes needed to fit into the RAM of a router, they most certainly do not have spare cycles for any shenanigans.

So when I traded in my old computer for a new one, eight gigs of RAM seemed like plenty – it’s not like I was planning on playing a ton of computer games, I just draw the occasional sketch or let a video transcode while I get a sandwich. My daily tasks were still going to be browsing and text editing.

How wrong I was. Zoom audio desyncs, input delay, freezing browsers while I’m reasearching. It’s been a huge pain to try and fit everything into eight gigs of RAM.

I looked to see what was consuming the memory – sure, browsers and electron apps. (so I quit discord and any extra windows I could.) But I noticed that Adobe CC was consuming about a gig of memory.

Now, Adobe CC has some of its processes managed by launchd* which I don’t have enough familiarity with yet to fully and elegantly kill all of this. But I have enough to start learning with, and pkill seems to work.

*launchd will automatically restart processes if they are killed.

Based on this answer, I should be able to write a small shell script killing all the processes Adobe is using (list here). And since these are the processes left over after telling Adobe CC not to start on login from its own preferences, I feel entirely justified in telling it “no” as this is my computer.

The shell script:

bash-3.2$ cat ~/bin/adobesassin.sh 
#!/bin/bash
pkill "Adobe Desktop Service"
pkill "CCLibrary"
pkill "CCXProcess"
pkill "Core Sync"
pkill "Creative Cloud Helper"
pkill "Creative Cloud"
pkill "Adobe CEF Helper"
pkill "AdobeIPCBroker"
pkill "Adobe Installer"
pkill "AdobeUpdaterService"
pkill "AdobeServiceInstaller"
pkill "CreativeCloud(URIHandler)"
pkill "AAM Updates Notifier"
pkill "node"
pkill "CoreSync"

 Simply save this somewhere useful, like ~/bin, and add it to your login items in “System Preferences” > “Users” > “Login Items” . Make sure to set the file association in Finder so that this script opens in terminal instead of Xcode, and that the script has the executable flag set.

It looks so much cleaner now….. maybe…..

Related Posts