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.
Related
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'm developing a react-native application. I used to work on my personal macbook pro for a while and everything was nice and smooth. Once my macbook broke and I switched to use my company's iMac. Now it takes me a very long time only to build on a real iPhone(which was fairly quick previously), but I have no idea why.
I just checked the performance benchmarks of ssds and usual hard drives. Well, it's huge!! And it also answers the TWO or THREE times slower build time on my new machine. (not to mention that iMac uses 5400rpm hard drives, not even 7200s!)
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.
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.
I recently changed from developing iOS apps on a MacMini to a new MacBook Pro (2.2 GHz Intel Core i7). While working in XCode, I occasionally get pop-ups when the system is apparently trying to do an autosave and runs into a problem.
The pop-ups state "The document [filename] could not be autosaved. The file has been changed by another application. Click Save Anyway to keep your changes and save the changes made by the other application as a version, or click Revert to keep the changes from the other application and save your changes as a version."
Examples of the filename are: AppDelegate.m, MyLoginViewController.m. There shouldn't be anything else that is changing those files.
I can't do anything within XCode until I choose one of the options. Sometimes it seems like the system is trying to overwrite my newest code with an old version of my code, sometimes it seems like it is trying to save my newest code. So, sometimes Revert is what I need to do to keep my current version, and other times Save Anyway is what I need to do. However, sometimes, I can't tell what the system is trying to do and I choose the wrong option and lose hours of work.
This has happened numerous times over a span of three weeks.
I am using OS X 10.7.2 and XCode 4.2.1. The code is on my MacBook's hard drive.
Does anybody have any idea why this is happening?
Thank you.
This is a huge problem, and it looks like it's Lion's force-fed "file-versioning" that is destroying work.
I typed quite a bit of code into my source and saved it regularly (pretty much after every complete paragraph). Suddenly I couldn't find an entire section that I'd just written. I even did a project-wide search, in case I'd accidentally entered it in the wrong file. Suddenly Xcode raised a dialog saying it couldn't autosave the file because it had been modified externally. Did I want to "revert", or save what was in the editor?
In the several times I've seen this come up on two systems over the past few weeks, I've chosen to save what's in the editor, thinking that obviously it must be the most recent version. WRONG. I hit "Revert", and the block of code reappeared.
There is so much wrong here, it's hard to decide what's the most offensive.
Confirming that this happens on XCode 4.3.2 on an iMac running 10.7.4.
I have found that this bug may be related to having the same file open in more than one tab or window in XCode. If you carefully avoid ever having more than one window open on a given file at a time I think you can avoid this problem. However, it undermines the very useful ability to apple-click method names to navigate to the file that contains them.
This has cost me hours of original work and been the source of immense frustration. The derisive comments from others are simply inadequate.
I heard they had a complicated fix for it already at Apple, but unfortunately, it was "accidentally lost" and now they can't remember which files need what changes to make it work again. :-/