XCode 9.3 breaks playground - xcode

I just upgraded from XCode 9.2 to XCode 9.3.
Since then my playground is very unresponsive/slow, animations play at unexpected times and UIKit elements are not properly layouted anymore.
Are there any known issues and/or fixes that I can apply?

Had same issue and there was no way around it. People filed bugs as far back as April 8th.
Best solution is to download Xcode 9.4 Beta from Apple Developer Page.
This worked for me and CPU usage is low and Xcode doesn't crash on playgrounds anymore.

Playgrounds have been buggy all along but 9.3 takes it to another level. Have you noticed a “diagnosticd” process taking up much of the cpu while running playgrounds? I suspect that this may be in part responsible for the lack of performance. Not much to do until Apple gets their act together (if ever)

Xcode 9.3.1 has just been released (10 May 2018) and is supposed to fix 'an issue that caused Xcode to slow down when editing a playground'.

Kill "homed"
My experience is that homed is going nuts, hogging the CPU.
Without quitting the Playground app, you can go into Activity Monitor (Applications > Utitlities > Activity Monitor) and sort by %CPU, you might see Process Name homed taking a large CPU load. Double clicking on homed and selecting Quit does not seem to harm the workings of the playground.
If you still encounter problems, you could close the Playground app, and use the same process to force quit com.apple.CoreSimulator.CoreSimulatorService, although doing that requires a lengthy process when you restart your Playground.

Related

Xcode two finger swipe to go back is broken in Xcode 12.5?

I am using the two finger swipe gesture to go back on Xcode a lot.
At least I used to because it seems to be broken since a few weeks now. Instead of going one step back, it now appears to jump two steps, making the feature completely unusable for me.
What I have tried:
restart Xcode
restart Mac
go through ~/Library/Developer/Xcode and delete or change various settings (getting desperate)
...but to no avail.
So I am starting to think that this my be an actual software bug in the particular Xcode version (I am using 12.5) but it seems unlikely because an issue like this should be easily caught by the engineer even before submitting the build to QA – just by the developer building the Xcode version, presumably with Xcode itself.
Does anyone else experience this? Is there some broken setting or cache that needs to be reset? Or can the hypothesis be backed up that this is indeed a software bug and all we can do is sit on our hands and try to reprogram years of muscle-memory to use control-command-left instead?
Xcode13 release fix it.
"methods
Additional bug fixes and stability improvements"

Xcode 10.2.1 Performance Issues

I have been using Xcode 10.2.1 since it came out and been having a pretty consistent performance issue. If I have Xcode open for a while it get's increasingly slow to the point that it's nearly unusable. Even clicking on controls in interface builder has a 2-5 second lag. The issue seems to resolve itself after restarting Xcode, but it's getting pretty annoying working with a laggy Xcode. I've also noticed that previously opened files are sequentially closed out of the main window (~5 per second) as Xcode quits like they had been open the whole time. It's very odd. Anyone have any idea what's going on or how to fix this issue?
Thanks in advance!

Xcode 9 performance issue

Have anyone tried out the new Color Asset Catalogue feature in Xcode 9. For me every time I edit something on this like adding or editing a colour asset, I have to wait for 10-15 seconds while Xcode shows the coloured progress and does not allow any interaction.
At the same time being highly annoying, it is also highly counter-productive. I also found IB to be generally too slow after updating to Xcode 9.
Are these known issues ? Is there a solution to this?
i asked apple about the hangs and crashes that keep on occurring on Xcode 9, and they replied:
First, quit Xcode. And then temporarily move aside
UserInterfaceState.xcuserstate so that new user state is created.
It can be found here
path_to/$WORKSPACE.xcworkspace/xcuserdata/$USER.xcuserdatad/UserInterfaceState.xcuserstate
(if it is an .xcodeproject, it will be deep in the project.xcworkspace
directory).
this worked for me with autocomplete problems and switching between files. hope it helps you out as well.
Xcode 9 is borderline unusable for me too at times. The worst is how long it takes to open/edit a storyboard file and also run the simulator. Even autocomplete and switching between code files is lagging a lot for me, much more so than past versions. I imagine Apple knows about it considering the Apple development forums are full of threads about how the newest update is unacceptable but as for how long it will take for them to do anything about it, who knows. It's an absolute nightmare for iOS developer's productivity to say the least.
My solution is to just quit Xcode when it starts getting too slow. It's a pain, obviously, but usually helps short term.

Xcode autocomplete stopped working

I am using Xcode 6.1 with a Swift project.
I get the "SourceKit" (iirc) editor crashing issue several times a day but it usually resolves itself and doesn't result in having to close Xcode.
Now the last time it happened it resolved itself but has now taken away all autocompletion calls. Nothing autocompletes, my class functions, UI*, nothing (aside from basic types UInt etc).
I have cleared derived data, removed Xcode and it's related files, re-installed and nothing completes automatically, nor by using the escape key to show suggestions. Autocomplete is definitely checked in preferences as I have been using it for almost a month prior to todays issue.
Has anyone else experienced this? and does anyone have a solution to this problem? Really, really need autocomplete back.
Thanks
Yes this is a bug that I have been experiencing for the last few days in 6.1 The solution for us was to stop building on the simulator. Once we did that (and started testing on actual devices) the sourceViewKit started working again. I'm not exactly sure why this is the case, but it seemed to work for us when nothing else did.
It is definitely a bug.
In fact changing to a different simulator (i.e. iPhone 5 to iPhone 5s) and running once does also solve the issue. You do not have to run on actual device (for those who do not have a paid developer license)
Xcode 6.3 public release version (released publicly at time of writing) seems to have fixed these issues (at long last).

Xcode 4 became extremely slow and kills my hard drive

My machine has 8 GB or RAM, Core 2 Duo 3,06 GHZ and it seems it is not enough for Xcode 4 (4.0.1).
From some time now it started to behave more and more slow. Auto completion, editing code as well as Xib files became almost impossible to use.
Other applications behave smoothly.
Activity monitor shows a lot of RAM usage (still few GB left of completely free memory, so it is quite OK) and huge disk activity usage. I can see on the graph high peaks of data being saved periodically when I work in Xcode. After 3 hours of work there is 10.5 GB of data written to the disk. Is it normal?
I have tried to disable auto-save but it did not help much.
What can be the other causes of this extremely slow behavior of Xcode 4?
It did not behave like this from the beginning and it is not during Xcode indexing. To be even more interesting: when Xcode is indexing my project after cleaning it takes less CPU power than when indexing is done (CPU raises up after indexing again). Heh?
UPDATE: Complete reinstall of Snow Leopard (to the cleaned disk) together with Xcode did not help much. Xcode was working quite well just for a day or so and then slowed down again to the degree it is hardly possible to work with.
UPDATE:
The solution was to mock around with #import "header.h" statements. It looks like Xcode requires a lot of processing power for intellisense when you you have complicated / circular imports structure (tracked down by performance tools - Xcode was falling into infinite recursive function call loop). When I moved as many imports I could to the implementation files and used forward declarations in headers, the problem went away.
This is what I have tried before:
Reinstalling (complete removal by:
sudo
/Developer/Library/uninstall-devtools
–mode=al) and installed new version
4.0.2 - Did NOT help at all. Anyway - Is it really complete removal as my main custom Xcode preference settings has survived)?
Defragmentation (iDefrag - full defragmentation with rebuiling B-Tree and Metadata) - Did NOT help at all.
System cleaning and antivirus scanning - CleanMyMac, MacKeeper - did NOT help at all.
Organizer - Repositories - cleaned all repositories (I use Git and Xcode somehow stores list there for its own reasons even if I use only command line to manage Git) - small improvement.
Organizer - Projects - cleaned all Projects from the list except opened ones - small improvement
File - Source control - disable Show Remote Status (was enabled somehow, thx to ThomasW for pointing to that), but did NOT help much.
Xcode - Preference - General - Disable Auto-Save (prompt only) and both Live Issues (In Editors, In Issue Navigator) - quite a bit of improvement.
Closed Utility Panel and Quick Help Pane - the biggest improvement! . I can finally type smoothly again! What a surprise. Such a trivial solution. It looks like help indexing / search assistant simply sucks! Why it does not do lookups in the background or something?
Xcode is still slow but now it is almost possible to work with production quality performance. Anyway it is quite a shame that Core 2 Duo 3,06Ghz / 8BG DDRIII Ram / Momentus XT SS Hybrid can hardly make it. I was so close to buy OCZ Vertex SSD or some other super extra SSD because of this.
I was running into performance problems with Xcode 4 and I tracked it down to the File->Source Control->Show Remote Status feature being on. Turning that feature off did the trick for me.
However, if that is not the issue then you should take samples of Xcode while it is having the performance issues. Either use the command line or the Activity Monitor application. This might give you a clue as to what the issue is. If it doesn't then post the sample here. Also, submit a bug to Apple with the sample.
The following helped me A LOT - purge the workspace file.
Xcode 4 - slow performance
I didn't download the applet they're talking about but just manually doing it is working very effectively so far...
[Update: corrected the link]
No this is not normal. I use a MAcbook Pro and it works quite normally, not sucking any more RAM than any other app. Occasionally it chews some CPU and RAM, but s restart and it's back to behaving. I put that down to XCode 4 still being quite new after the rebuild.
If you are getting this sort of behavior, I'd suggest completely uninstalling XCode and all developer tools. Make sure you get the SDKs and everything out. Reboot. Then reinstall and see if it improves.
Oh, and I use Git for all my projects.
For me, Storyboard was almost unusable until I clicked on the View Controller and then "Editor - Resolve AutoLayout Issues - Clear All Constraints in View Controller".
I had been trying to fix layout issues and was also toggling the [3.5" / 4" Retina] button in the constraint tool bar (lower-right of the Storyboard window).
Once I cleared this, Xcode performance was back to 100%.

Resources