A tweet went around about Google Drive raising its prices again, and it reminded me I've been meaning to write this for a while. If you're a developer who keeps your projects in OneDrive, Google Drive, or iCloud Drive: stop. Or at least, stop using it as your working directory.
I spent $300 on OneDrive over the years and nearly every annoying Mac performance problem I had traced back to it. I'm the cautionary tale here.
The CPU and Disk Tax
Cloud sync clients are always watching. Every file you save, every file your build tool touches, every temp file a linter writes gets noticed and queued for upload.
That's fine for documents. Code projects are a different animal.
A node_modules directory for a medium-sized JavaScript project can have 80,000 files. Every npm install creates or modifies tens of thousands of them at once. The sync client sees that and immediately tries to upload all of it. CPU pegs, disk churns, fan spins up. And once it finishes uploading, it'll download the same files to your other devices.
Python virtual environments work the same way. A fresh python -m venv .venv creates several thousand files. Run it inside a synced folder and you've just handed your sync client hours of busywork.
My Mac used to feel snappy. Then I started keeping everything in OneDrive. I blamed background processes, Spotlight, old hardware. It was OneDrive the whole time.
Browser Profiles Are Even Worse
A Firefox or Chrome profile is a live database. The browser is constantly writing to it: session data, cache, history, IndexedDB. Thousands of tiny files, always changing. Sync clients are not built for this. They'll fight the browser for file locks, create conflicts, and generate constant disk I/O just trying to keep up.
I've seen people back up their browser profile to OneDrive and then wonder why their browser got sluggish and the sync client showed a permanent "uploading" spinner. Browser profiles live on local disk. That's it.
OneDrive's Phantom File Problem
There's another issue specific to OneDrive on macOS. Its "Files On-Demand" feature shows files in Finder as if they're local when they're actually just placeholders. Developer tools don't know the difference.
I had Git completely fall apart because .git/objects/ was full of these phantom files. Git tried to mmap them and got timeouts. I wrote the full breakdown here, but the short version is every commit became a workaround involving /tmp clones. Not fun.
That wasn't even the only OneDrive problem I hit. The upload dialog on my Mac started freezing for up to 5 minutes every time I tried to attach a file to anything. Traced it back to a corrupt Launch Services entry. Would it have been there without OneDrive? Maybe. But I wouldn't have had so many weird file types in my filesystem to begin with.
What to Do Instead
Buy a hard drive. Seriously.
A 2TB external HDD is $70 on Black Friday. A 4TB is $80-90. Even a decent external SSD for faster access is well under $200. You'll spend that much on cloud storage in a year or two anyway, and the drive doesn't send your code to someone else's server or try to sync 100,000 node dependencies.
I spent $300 on OneDrive over a few years and got a sluggish Mac, phantom Git files, frozen upload dialogs, and constant fan noise. A $70 Black Friday drive would have cost less and caused none of that.
Keep projects on local disk. Use cloud storage for things that actually benefit from it: documents, photos, finished work you want from anywhere. Put a .gitignore on node_modules and .venv regardless. For offsite backup of your code, push to a Git remote. That's what it's for.
If your Mac feels slow and your projects folder is synced, pull it off the sync client for a week. You'll probably be surprised.
While You're at It: Fix Option+Arrow in iTerm2
Since we're talking about things that silently make your dev life worse: if you're on a Mac and use iTerm2, Option+Left and Option+Right probably don't jump by word like they should. Instead they type ;3D and ;3C into your terminal. You get used to hitting Esc-B and Esc-F instead, but you can't hold those down to repeat, so navigating long commands stays painful.
The fix is in iTerm2's settings, but the UI actively fights you finding it:
- Open Settings (⌘,)
- Go to Profiles → Keys → Key Bindings
- Here's the catch: clicking "Keys" dumps you on a "General" sub-tab. You have to click Key Bindings. Then you may need to click Keys again, because clicking "Key Bindings" can kick you back. It took me an embarrassingly long time to get past this.
- Once you're actually on the Key Bindings list, click the + button at the bottom
- For Option+Left: set Action to "Send Escape Sequence", type
b - For Option+Right: set Action to "Send Escape Sequence", type
f - Keep both set to "Apply to current session" so it sends to whatever window, tab, or session you're in
Now you can hold Option+Arrow to zip through commands word by word. Terminal instantly becomes 10× more usable, and you'll wonder why this isn't the default.