Xcode performance

Joined
Nov 5, 2022
Messages
67
Reaction score
15
Points
8
Location
SE Michigan
Your Mac's Specs
Mac mini M2 8GB, Sonoma 14.1.2
Hey all...

New Mac owner. Well...new to me anyway. It's a 2014 Mac Mini running Monterey. This is my first Mac, and I've been very impressed with how well it performs despite being 8 years old - it's an i5 2-core w/16mb of memory and a 1TB HD. I thought the big test of whether this was going to be powerful enough for my needs was the 3D CAD software I run, but that runs just fine.

However, Xcode is another story entirely. Runs like a pig. Almost unusable. Even when I set it to run code manually (I'm new to Swift so I'm just doing Playground coding right now) it slows to a crawl.

My question is this. The shop where I bought this can install (relatively inexpensively) a 512GB SSD to replace this slow HD. I'm thinking this will NOT impact the performance I'm seeing in Xcode as I'm assuming the performance issue is this old i5 2-core processor, not disk access. If I'm right, I'll just have to put off Xcode development until next year when I plan on buying a new Mini running Apple silicon, but thought I'd ask here about this. TBH I was shocked at how horrible Xcode runs. I'm an old Python programmer and using even a robust IDE doing Python development can be done on pretty lame hardware!! :)

Thanks!
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,762
Reaction score
2,100
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
The Playground is a VERY resource heavy tool since it's actively compiling your code to generate the output. It's a dog on my 2019 MBP with a 8-core i9 at 2.3Ghz. My Mac Studio (M1 Max) has absolutely no issues with it.

And you are right, the harddrive (HDD or SSD) isn't the bottleneck, it's the CPU first and 16MB of memory second.

If you were to write your code and then compile and run, it'll be faster without having to do a live preview of it.
 
OP
S
Joined
Nov 5, 2022
Messages
67
Reaction score
15
Points
8
Location
SE Michigan
Your Mac's Specs
Mac mini M2 8GB, Sonoma 14.1.2
Well, I hope I won't need to invest in a Mac Studio to run the Playground!! :) Maybe I can just bypass the Playground and bull ahead with building some simple stuff. Having done both Python and C#, the syntax is very familiar, so that will come with time.

Thanks for the confirmation re the drive.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,762
Reaction score
2,100
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Swift is not like either of those languages. 😃

It has a lot of the basic stuff that every language has, and then a bunch of stuff unique to it like optionals which still makes my head hurt.

If you are doing straight up Swift and not SwiftUI, there are ways to still use the system.

For each workflow, you have to match the system. For example, an MBA is a very poor choice as a developer machine. It, however, is perfect for online shopping, streaming content and other simple tasks.
 
OP
S
Joined
Nov 5, 2022
Messages
67
Reaction score
15
Points
8
Location
SE Michigan
Your Mac's Specs
Mac mini M2 8GB, Sonoma 14.1.2
Swift is not like either of those languages. 😃

It has a lot of the basic stuff that every language has, and then a bunch of stuff unique to it like optionals which still makes my head hurt.

If you are doing straight up Swift and not SwiftUI, there are ways to still use the system.

For each workflow, you have to match the system. For example, an MBA is a very poor choice as a developer machine. It, however, is perfect for online shopping, streaming content and other simple tasks.
Each language is unique in certain ways. But there seems to be a bit of convergence wrt syntax so that languages that you're not familiar with (unlike "C" which can be cryptic even to experienced folks) can still be followed, even though the nuances may be missed. I'm not familiar with the MBA acronym though...:unsure: What is that?

As to optionals, having written 95% of my code for database systems which have the option of defining fields as being able to accept NULL values (some DB's allow null values by default) so I well appreciate the value of variables/fields that can accept NULL values. As with any strongly-typed language, you have to be aware of trying to stuff an incompatible data type into a token. It's been a few years but IIRC both C# and Python variables can accept NULL values by default. I've been away from it for about 7 years, so I'm rusty. But it's really useful particularly in booleans where you can distinguish clearly between "Yes", "No" and "Don't know." I've seen programmers get themselves into very sticky corners by writing code that doesn't recognize NULL values. They design the DB (something most programmers don't have the training for) and don't allow NULL values on boolean fields, not wanting to deal with that additional complexity. Depending on the context, there can be a HUGE difference between "No" and "Don't know."

IAC, this is just hobby-level development. I'm in no rush, so if I have to wait until I have a beefier machine to work with it's NBD.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,762
Reaction score
2,100
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
MBA = Macbook Air.

And having cut my teeth on C, C++ and Assembly, I have a different perspective on these "cute" languages that make things easier for today's programmer. 😃

Swift and Obj-C do have the concept of NULL as the 'nil' operator. While Obj-C does use that to denote the lack of a value, Swift has taken the route of telling you that a variable has nothing in it through optional wrapping.
 
OP
S
Joined
Nov 5, 2022
Messages
67
Reaction score
15
Points
8
Location
SE Michigan
Your Mac's Specs
Mac mini M2 8GB, Sonoma 14.1.2
MBA = Macbook Air.

And having cut my teeth on C, C++ and Assembly, I have a different perspective on these "cute" languages that make things easier for today's programmer. 😃

Swift and Obj-C do have the concept of NULL as the 'nil' operator. While Obj-C does use that to denote the lack of a value, Swift has taken the route of telling you that a variable has nothing in it through optional wrapping.
Yeah - serious programmers write assembly code! 😎

Thanks for the acronym decode…😊
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,762
Reaction score
2,100
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Yeah - serious programmers write assembly code! 😎
The fun I used to have pushing and popping things into and out of random registers and crashing the systems. Until you've experienced the joy of a bare machine level crash, you haven't lived. 😃
 
OP
S
Joined
Nov 5, 2022
Messages
67
Reaction score
15
Points
8
Location
SE Michigan
Your Mac's Specs
Mac mini M2 8GB, Sonoma 14.1.2
The fun I used to have pushing and popping things into and out of random registers and crashing the systems. Until you've experienced the joy of a bare machine level crash, you haven't lived. 😃
😂👍
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top