Only install OSX and command line related tools during XCode installation - xcode

XCode is getting too bloated, and it easily installs a whopping 8 Gb or more to your precious laptop whose disk space you have been meticulously monitoring. Although it is possible to delete unwanted SDK (such as Watch, Apple TV, iOS etc.) and platform files after XCode installation, this may not be feasible for computers that have smaller disk space. It is also not a good practice to write such a big content to the disk just to clear them later (after noticing it and figuring out how to do so).
Is there a way, maybe not quite straightforward, to install selectively only the necessary/useful components of XCode and ignore the rest?

Related

Is Xcode necessary for macOS Command Line Tools?

As most of macOS users will agree, if you don't have much storage and not using Xcode directly for your development purposes, it can be a bottleneck sometimes. It really keeps huge storage, in my case one-tenth of 128 GB storage.
My question here is, is it necessary to keep Xcode downloaded even after installing command line tools from the terminal? Can we uninstall it after completing all downloads for development tools or is it a bad practice and needs to stay installed?
I didn't try anything to not mess up the dev tools.

Couldn't find disk developer image, Xcode Compatibility issue

I ran into this problem when iOS 10 was released. They are updating their device definitions so fast, that our small dev team can't match their speed. In result we need to develop on previous versions. But now our app crashes on 10.1 and we cannot debug. We need to wait for whole download to happen. Is it so hard to manage dev disk image to a place ? do they maintain disk image? or any other solution to the problem.

Appcelerator Studio is very slow when scroll

Appcelerator Studio, build: 4.7.1.201609100950
macOS Sierra 10.12
iMac (Retina 4K, 21.5-inch, Late 2015)
Java 8
Node.js 4.4.7
npm 2.15.8
Titanium CLI 5.0.9
I've tried (many times) to reinstall the editor, but without solving the problem. The editor is really really slow when scroll (after macOS Sierra update). It's impossible to use it without going crazy. I use Appcelerator Studio for many years and i have never had these problems.
There are other external components that could upgrade / reinstall? (Java.. etc etc)
Thanks
Update
In addition to the slowdown, the editor does not properly recognize the file format.
I had this slow down issue with appcelerator Studio as well (some of my colleagues swear by using Atom editor)... this happens with Appcelerator when you have one .js file that is huge (thousands of lines).
Ideally, split your js file into seperate commonJS files and coll them into the original js file with require('filejs')
I also had this problem for almost 1 month and I went completely crazy one day due to Studio slow-ness.
I tried complete fresh installation of Appc & all of its components 2-3 times, but no luck.
Then on one day, it was not working even like previous day, so I decided to completely format my MacintoshHD and re-install the macOS Sierra because I noticed that some other normal apps like Skype & Email were also started working slowly. So I got the idea that it's related to macOS Sierra update.
Very Important Note (take system backup first)
Before installing OS, I took backup in external hard-drive and then I ran the First Aid (Disk Utility Tool) on MacintoshHD and found that there were some corruptions in it, so I fixed them but then something really crazy & out of this world happened with my system - Kernel Panic and my system did not start-up for 3 hours of hectic try.
So the last solution was to format the Macintosh HD & install the OS again. The best way to do this is to make a bootable pen-drive having macOS Sierra in it and then install using it.
Another way (if you have very good speed LAN) is to connect your system to Apple server and let it install latest OS from online. But it will download the whole OS & other required files (of at least 5GB size).
There are many online tutorials on how to install macOS Sierra again after such creepy issues.
FYI: I did re-installation of macOS Sierra last week & now everything is working like it is supposed to work on a Mac machine (just buttery smooth.).

Very slow tab switching in Xcode 4.5 (Mountain Lion)

I recently updated my MacBook Pro (2.3 GHz Intel Core i5) from Lion to Mountain Lion and simultaneously upgraded Xcode to the latest 4.5 version. I've experienced one very irritating problem. While programming I'm used to have a couple of tabs opened at a time. Ever since I updated, each time I switch tabs, Xcode freezes up for a bit (a couple of seconds). Does anyone have a suggestion to solve this problem?
I followed a tip on deleting project.xcworkspace to improve performance. Which seamed to help, but only for a short period of time.
It's a common issue and was fixed in XCode 4.5.1.
https://devforums.apple.com/thread/167765?tstart=0
If you have multiple partitions (maybe a backup of Lion was kept) ensure that xcode really comes from the Mountain Lion partition.
The App Store App update for Xcode seems to take the first Xcode.app it finds and will apply any update to that version. In my case it updated the (inactive) Lion partition, even so I booted from the ML partition.
xcode-select did not complain when I tried to change it to the ML version.
So I ended up doing the great housekeeping:
do a chmod 000 /Volume/<old Lion partition>/Applications/Xcode.app
installed a fresh copy on Xcode.app into /Applications
verify the destination of the dock icon (must point to the ML Xcode.app)
My Xcode is now fast as before and it remains fast. You can get the Xcode dmg and the command line tools from https://developer.apple.com/downloads/index.action. I don't think there is a difference in the binaries, but with the DMG I could see where I dropped the Xcode.app.
I found your question before I discovered a partial solution.
As of today, I find XCode 4.6.1 GUI dog slow for my taste, specially considering that I run on a one year old mac, SSD, compile to a 2GB RAM disk and still have 6GB RAM left. Even Eclipse runs lightning fast compared to XCode
4.5.1 did improve something, but after a long time using XCode I do not have any hope for some of its problems being solved ever.
That being said, I have noticed that "Live issues", the main tool bar and all the panels slow down tab switching to same degree. The biggest offender so far are the navigator panels.
Once I got used to a minimalistic Xcode window, layout some specific task tabs, keep a separate window for xibs and learned the shortcuts to enable/disable the panels, I no longer suffer so much with XCode responsiveness, but there is still some lag that can be clearly felt.
Check that there is not heavy coding on ViewWillDisappear.
Also if you have NSURLConnection or any other having delegate methods should not get called while switching tabs.

How to disable indexing in Xcode 4?

Not a long time ago I updated Xcode to version 4. This new version spent a lot of time on indexing the project (it's quite large). That's why I would like to disable indexing. Searching through Xcode help and internet gave no results.
Open a terminal window and paste this command:
defaults write com.apple.dt.XCode IDEIndexDisable 1
You'll lose some features (autocomplete, jump to definition, some of the assistants won't work right). But you'll gain back ram and cpu.
For my project Xcode went from using 2 Gigs to a few hundred MB. (which I sorely needed to compile with ;))
Reducing the priority of the XCode process helps:
renice 10 -p PID
You can get the PID from the Activity Monitor or top/ps commands.
This problem has been noticed on this newsgroup:
The crux of it seems to be that XCode4 uses crazy amounts of ram during indexing - like, 5gb or so(!), and thus if you're on a machine with something like 12gb, there's no problem, but if you're on a laptop with only 2gb or so, you'll have some pretty severe paging going on.
I'm guessing apple's internal engineers were all rocking maxed-out mac pros or something.
I ran into either the same problem or something similar. My project includes heavily templated C++. Including those headers in the PCH file solved the problem for me.
My new retina Macbook pro running XCode 4 was extremely slow doing indexing (and everything else). My Mac mini at home was very fast working on the same project!? Turns out it was my anti-virus software - doing a scan of every file read or written on the MacBook. Turning that off sped everything up by a ton.
Slow indexing is not a given. And more memory isn't necessarily better.
I have a medium sized project for work ~ 500 source files. After deleting the derived data, it takes 18 minutes to finish reindexing this project. That's with no other apps open and not doing anything else with the computer. This is on a fairly recent Macbook Pro with 8G of memory and an i7. Horrible, right?
My home machine is a recent Mac Mini with 4G of memory and an i5. On that machine the exact same project takes 40 seconds to completely index.
I don't yet know what the difference is, but I'm working on it.
It's not possible to disable indexing in Xcode 4. Many of the IDE's features are built on top of the index it maintains.

Resources