Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preserving battery life when using Xcode - your settings/recommendations?

I often find myself wanting to open Xcode and do a little coding on international flights and while I'm away from power, but it's a quick way to empty my MacBook Pro's battery.

What settings do you use to preserve battery life while running Xcode?

like image 455
Tony Arnold Avatar asked Jan 23 '23 17:01

Tony Arnold


1 Answers

Predictive compilation automatically disables itself when running on battery.

If you have a dual-core machine,

defaults write com.apple.Xcode XCMaxNumberOfDistributedTasks 1 

compiles one file at a time (instead of one on each core of your dual-core CPU) which may result in some savings.

like image 152
cdespinosa Avatar answered Jan 26 '23 06:01

cdespinosa