I am using Xcode 5. When I had Mountain Lion installed, doing a build after a clean took less than 10 seconds for my project. It was extremely fast.
After upgrading to Mavericks, doing a build after a clean now takes about 2 minutes for my project. It takes almost one second to compile each source file! The source code is exactly the same as the code before the upgrade, so I know that this problem is definitely caused by the Mavericks upgrade.
Running the top command shows about 15 clang processes during build time. Each clang process keeps switching from the "sleeping" and "stuck" state. So I'm wondering if this issue has something to do with race conditions with the multiple clang processes.
So far I have tried rebooting, and reinstalling XCode.
Edit
Other Info: I'm using the latest macbook pro with retina display with 16GB of ram. I also have file vault enabled. Will try disabling it to see if it changes performance.
I've solved the problem. Turns out it was my virus scanner McAfee. It must have been scanning every source file before letting Xcode compile it. The weird thing is the virus scanner was taking up almost no cpu cycles.
Related
I have enough knowledge about Storyboard, now I am using SwiftUI first time, I have already designed 4 screens for my app but now compiler take too much time to build code every time. It is very painful process.
My system is MacBook Pro 2015, with 500GB Flash Drive and 8gb ram.
I am using Xcode 11.1 and Catalina 10.15.1
What can I do so that build time will increase or something else?
I am building/running a relatively simple chat application. Every time I run/build the application, the fans on my MacBook get extremely loud and my computer begins to heat up very quickly. Furthermore the builds are taking a ridiculous amount of time to finish, even after editing just a single line of code.
I opened up activity monitor and noticed that "SourceKitService" was using 100% of the CPU.
Earlier today, I deleted the DerivedData folder for my project, and that still doesn't seem to solve this issue.
How can I fix this?
Try doing a deep clean (Command+Shift+K), deleting derived data, closing Xcode, and restart Mac. That usually helps me. However, when I'm running apps on my 8GB memory Mac some cause the same issue while my 16GB Mac runs them just fine.
I am using Rubymine to work on a suite of rails projects. There are quite a bit of gems and source files, but I think rubymine should be able to handle everything despite the size...
My sources files (and gems) are shared in a Vagrant box (see https://stackoverflow.com/a/19662310/311744).
Sometimes, when I am editing, Rubymine freezes. (about 5-6 seconds).
Usually, 3-4 minutes after I restart the IDE, everything is fine. Then I have one big 5 seconds freeze, and then from that point every 15-20 seconds I have a new freeze. During a freeze, Rubymine takes 100% (or a big part) of the CPU.
I am running on MacOS 10.8.5 on a recent MBPr.
I don't want to give up Rubymine. How can I troubleshoot that ?
In case of the performance issues you should start from the troubleshooting guides on the official support site:
thread dumps
CPU snapshots
idea.log
Check that all the files are local, try to increase the heap size in case the problem is caused by the JVM garbage collection.
If nothing helps, provide all the collected data to the technical support team or to the issue tracker.
Trying RubyMine 6.0 will definitely not hurt as noted in the comment above =)
This guide is for all the users having performance issues with RubyMine or any other IntelliJ IDEA platform based IDE.
When I code in Xcode on my MacBook Pro at work, autosuggestions seem to take 6-8 seconds. On my MacBook Air at home, they appear instantly.
Is there any reason for this? I don't see anything in Xcode's preferences that would cause this:
Any ideas here?
I have a shiny new iMac at work for development. It's an i7 proc, 8 GB memory. Indexing (and the things that go with it, like code sense or quick documentation) was taking a very long time (5 minutes for ~600 files). So was compilation.
The culprit turned out to be the corporate antivirus' on-access scan. I disabled on-access scanning and indexing dropped to around 5 seconds for the same number of files. Might be worth a shot if you have permissions to change antivirus settings.
On one of the developer blogs I follow (I can't find the link at the moment), the author said he regularly has to delete the DerivedData folder for his projects because of corruption that causes issues like this. Give that a try and see if it helps.
It's not SSD vs. non-SSD. My 2009 MacBook Pro shows suggestions nearly instantaneously.
After running into this issue for the 10 billionth time and nearly whipping my mac air out the window in frustration, I've decided to break down and ask if anyone else has run into this...
Environment: running the latest version of XCode (as of this question: 4.2, build 4C199) for an iOS 4.2+ application (universal app).
It appears that GDB randomly decides to completely hang while stepping through lines of code. This has happened to me now on multiple codebases, and in various locations throughout each codebase. The stepping process hangs on an arbitrary point and requires that the running iOS simulator or on-device process be stopped and restarted. Typically, after restarting my debugging session I am able to get to a different arbitrary point in stepping into/thru -- sometimes even enough to actually debug my code entirely (gasp).
I tried wiping my drive, re-installing a fresh copy of Mac OS X 10.6.8 and the aforementioned XCode... No difference.
I tried switching debuggers to LLDB; this resolved the hanging issue, but I'm not as big a fan of LLDB and prefer to use my environment as close to stock as possible.
Any thoughts?
If GDB is still hanging after reinstalling your OS and your SDK, it may be a design issue with your particular code. Does this happen with other projects?
If it makes you feel any better, Apple is moving to LLDB as the stock debugger for Xcode, probably due to issues like your aforementioned issue.