Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iMacedonian

macrumors member
Original poster
Oct 10, 2015
85
87
Brno, CZ
Hey there.

I am seriously considering getting a MacBook Pro 13" 2018. The primary use of the laptop would be for coding (front-end web development) but I'd like to dive in into iOS app development later on. With that said, are 8 GB of RAM enough to run XCODE or I should invest some more to get the 16 GB version?
 

revmacian

macrumors 68000
Oct 20, 2018
1,745
1,468
USA
Hey there.

I am seriously considering getting a MacBook Pro 13" 2018. The primary use of the laptop would be for coding (front-end web development) but I'd like to dive in into iOS app development later on. With that said, are 8 GB of RAM enough to run XCODE or I should invest some more to get the 16 GB version?
I run Xcode on my 2014 Mac mini - it has 4GB RAM and I don't see any problems. There will be some people who will tell you that 16GB or more RAM is a must, but I have seen that this simply isn't true.
 

Emanuel Rodriguez

macrumors 6502
Oct 17, 2018
376
600
I run Xcode on my 2014 Mac mini - it has 4GB RAM and I don't see any problems. There will be some people who will tell you that 16GB or more RAM is a must, but I have seen that this simply isn't true.
Agreed. I've found that even a Raspberry Pi with its single gig of RAM is capable of compiling most things. If a project has a ton of C++ code (looking at you LLVM), or other complex languages (requiring the compiler to work hard, and thus use more RAM), then it generally can't manage it. Seems around 3GB is a safe minimum for development work, in my experience.

EDIT: Although keep in mind that this was 3GB inside a VM, without a GUI. The 8GB option is definitely safe, for now. I'd recommend 16GB just for future-proofing though. 8GB is starting to become less comfortable than in times past.
 
Last edited:

ammulder

macrumors newbie
Dec 18, 2015
5
4
How long are you planning to keep the machine? Since the memory can't be upgraded, you're really buying for how much memory you'll need in 3-5 years, not today. (Bearing in mind that every release of development tools uses more memory than the last.) Particularly if you end up using containers or VMs (e.g. to run a local version of some back-end that your app connects to), the productivity hit of too little memory later is not worth the cost savings now.
 

960design

macrumors 68040
Apr 17, 2012
3,796
1,675
Destin, FL
Hey there.

I am seriously considering getting a MacBook Pro 13" 2018. The primary use of the laptop would be for coding (front-end web development) but I'd like to dive in into iOS app development later on. With that said, are 8 GB of RAM enough to run XCODE or I should invest some more to get the 16 GB version?
8GB is plenty, I use a 16GB MBPr and rarely see the memory pressure jump above 8GB.

As an aside, check into Expo.io ( https://expo.io/ ). It is what all the cool kids use these days ( so much easier to deploy on multiple platforms ). Caveat: will work for most apps, but some have specific hardware requirements / needs that expo will not fulfill. Nonetheless a fantastic starting place.
 
  • Like
Reactions: iMacedonian

jtara

macrumors 68020
Mar 23, 2009
2,008
536
Define what you mean by "enough"?

Do you mean "enough so that builds don't fail?"

Or "enough so that builds complete in an acceptable timeframe"?

And/or "enough so that the UI isn't laggy, and I can work in an editor/browse the web/read email during a build without sluggishness?

It depends on your expectations and your toolchain.

Frontend development typically has a short/simple toolchain. All you really need is a good editor suitable for the task, some little "toy" web server, perhaps some tools for minifying Javascript/CSS (and perhaps a Sass compiler) for production builds, and during development you typically wouldn't even use that.

Backend development might often need no more than front-end development. Or might need quite a bit more. For example, I use PostgreSQL as a database. So, I have a local instance for development/test. I run pgAdmin4, which runs in a Docker container. You might need to run a VM that replicates your backend environment. The GB add up.

Native app development is often done with minimal tools. For basic iOS app development, you need nothing more than Xcode. OK, and the iOS simulator. If you are doing some sort of hybrid, cross-platform development, probably add additional toolchain components - and of necessity Android SDKs and build tools. Android development uses a different compiler. Add another simulator. (I use GenyMotion, since both approaches provided by Google are slow as molasses.) Any decent Android simulator runs in a VM.

Oh, need to test that website on Windows? Add a Windows VM.

So many tools today run in a container or a VM. That adds to memory requirement.

Get as much memory as your budget can stand. I think, though, 64GB is the practical bound today for most development. I recently got an iMac Pro with 64GB for development. I use a big tool set. I've been checking Activity Monitor, and I find that I haven't used a swap file yet. But once all the tools are loaded up, I am using somewhere between 32GB and 64GB, typically 40-50GB. But I actually haven't had EVERYTHING loaded up at once yet.

What you have to ask yourself is:

- Is it important for the system to be responsive while building?
- How long of a build cycle are you willing to tolerate?

In front end development, you typically do not have a "build cycle", that is, build/test/repeat. How long are you willing to wait to find out you made a simple mistake that will take a few seconds to correct? 15 minutes? 5 minutes? 1 minute? 30 seconds?

In app development using a compiled language, you always have a build cycle, and it can be significant. I understand that the Swift build cycle is substantially longer than the Objective-C build cycle. (I don't use Swift myself, because I do hybrid development, and the underlying platform code is in Objective-C (Java for Android), C, and C++ - no Swift).

Amount of available RAM will have a significant impact of build cycle time.
 

jtara

macrumors 68020
Mar 23, 2009
2,008
536
Yes. 8GB RAM is enough for most things.

Does MacBook Pro use system memory for the display?

8GB surely is not enough on - for example - a Mac Mini, as a pretty good chunk (depending on model) of that is used for the display.

Most important feedback given here is that on recent MacBooks, memory is soldered down. You are making a decision for the next several years.
 
  • Like
Reactions: iMacedonian

Toutou

macrumors 65816
Jan 6, 2015
1,083
1,579
Prague, Czech Republic
If you're on a budget (and there's no shame in that), 8 gigs will be enough. While some development tools are pretty RAM-heavy (*cough* Android Studio *cough*), my 4 gig 2013 Pro is still usable. And my work-issued ThinkPad that I do Rails development on (in RubyMine, in Linux) works like a charm with 8 gigs.
 
  • Like
Reactions: iMacedonian

iMacedonian

macrumors member
Original poster
Oct 10, 2015
85
87
Brno, CZ
Define what you mean by "enough"?

Do you mean "enough so that builds don't fail?"

Or "enough so that builds complete in an acceptable timeframe"?

And/or "enough so that the UI isn't laggy, and I can work in an editor/browse the web/read email during a build without sluggishness?

It depends on your expectations and your toolchain.

Frontend development typically has a short/simple toolchain. All you really need is a good editor suitable for the task, some little "toy" web server, perhaps some tools for minifying Javascript/CSS (and perhaps a Sass compiler) for production builds, and during development you typically wouldn't even use that.

Backend development might often need no more than front-end development. Or might need quite a bit more. For example, I use PostgreSQL as a database. So, I have a local instance for development/test. I run pgAdmin4, which runs in a Docker container. You might need to run a VM that replicates your backend environment. The GB add up.

Native app development is often done with minimal tools. For basic iOS app development, you need nothing more than Xcode. OK, and the iOS simulator. If you are doing some sort of hybrid, cross-platform development, probably add additional toolchain components - and of necessity Android SDKs and build tools. Android development uses a different compiler. Add another simulator. (I use GenyMotion, since both approaches provided by Google are slow as molasses.) Any decent Android simulator runs in a VM.

Oh, need to test that website on Windows? Add a Windows VM.

So many tools today run in a container or a VM. That adds to memory requirement.

Get as much memory as your budget can stand. I think, though, 64GB is the practical bound today for most development. I recently got an iMac Pro with 64GB for development. I use a big tool set. I've been checking Activity Monitor, and I find that I haven't used a swap file yet. But once all the tools are loaded up, I am using somewhere between 32GB and 64GB, typically 40-50GB. But I actually haven't had EVERYTHING loaded up at once yet.

What you have to ask yourself is:

- Is it important for the system to be responsive while building?
- How long of a build cycle are you willing to tolerate?

In front end development, you typically do not have a "build cycle", that is, build/test/repeat. How long are you willing to wait to find out you made a simple mistake that will take a few seconds to correct? 15 minutes? 5 minutes? 1 minute? 30 seconds?

In app development using a compiled language, you always have a build cycle, and it can be significant. I understand that the Swift build cycle is substantially longer than the Objective-C build cycle. (I don't use Swift myself, because I do hybrid development, and the underlying platform code is in Objective-C (Java for Android), C, and C++ - no Swift).

Amount of available RAM will have a significant impact of build cycle time.
Thanks for that extensive response, it gave me a better perspective on the resources needed for these various coding scenarios you've mentioned.
[doublepost=1545084766][/doublepost]
How long are you planning to keep the machine? Since the memory can't be upgraded, you're really buying for how much memory you'll need in 3-5 years, not today. (Bearing in mind that every release of development tools uses more memory than the last.) Particularly if you end up using containers or VMs (e.g. to run a local version of some back-end that your app connects to), the productivity hit of too little memory later is not worth the cost savings now.
My laptops usually last 4-6 years, or even more, so based on what I've read so far, maybe it'd be best to get the 16 GB version if I want to maximize the usage.
 

Anony-mouse

macrumors member
Aug 25, 2016
61
70
Define what you mean by "enough"?

(snip)

So many tools today run in a container or a VM. That adds to memory requirement.

Get as much memory as your budget can stand. I think, though, 64GB is the practical bound today for most development. I recently got an iMac Pro with 64GB for development. I use a big tool set. I've been checking Activity Monitor, and I find that I haven't used a swap file yet. But once all the tools are loaded up, I am using somewhere between 32GB and 64GB, typically 40-50GB. But I actually haven't had EVERYTHING loaded up at once yet.

What you have to ask yourself is:

- Is it important for the system to be responsive while building?
- How long of a build cycle are you willing to tolerate?

In front end development, you typically do not have a "build cycle", that is, build/test/repeat. How long are you willing to wait to find out you made a simple mistake that will take a few seconds to correct? 15 minutes? 5 minutes? 1 minute? 30 seconds?

In app development using a compiled language, you always have a build cycle, and it can be significant. I understand that the Swift build cycle is substantially longer than the Objective-C build cycle. (I don't use Swift myself, because I do hybrid development, and the underlying platform code is in Objective-C (Java for Android), C, and C++ - no Swift).

Amount of available RAM will have a significant impact of build cycle time.

This pretty much sums it up. If you need to run VMs, then 8 GB is doable (you can run one VM comfortably in 8 GB RAM). If you have a SSD, the speed difference between having 8 GB vs. more RAM will not be very obvious unless you're running a large number of VMs and/or trying to compile a huge codebase.
 

Construct

macrumors newbie
Jun 23, 2010
10
1
The difference between an 8GB machine and a 16GB machine is that you will, at times, have to make conscious decisions about which memory-hungry apps to keep in the foreground.

Memory hungry apps like XCode and Android Studio will do just fine in 8GB. The problem would come if you tried to run Slack connected to multiple groups, while leaving Chrome open with numerous tabs, or maybe a VM system to run some Docker containers. It's the concurrency that causes the problems.

If you can afford the jump to 16GB and you plan to keep this machine for a while, I think it's entirely worth it for the future-proofing. If the extra cost is enough to make you think twice, then forget about it and just do 8GB. You'll be happy either way.
 
  • Like
Reactions: Anony-mouse

jtara

macrumors 68020
Mar 23, 2009
2,008
536
(People often keep application for compiling and play games till that time. This slow down the processing)

Or you could just speed up the compile-link-run cycle to the point where it takes no more than a healthy get-your-butt-out-of-the-chair for a couple of minutes.

One part of that is having enough memory for the compiler to work efficiently, with minimal/no swapping.

That you CAN doesn't mean that you SHOULD. You have to decide how valuable your time is.

The defining moment for this equation for me was many, many years ago. A product called Instant-C. It reduced that cycle from several minutes to several seconds. It inspired me to reduce a compile-link-run cycle for an application that simulates and analyzes variations (from a model, originally written in Fortran) in mechanical assemblies from 1/2 hour to less than a minute. (OK, I cheated - I removed the compile-link-run cycle... by writing a domain-specific compiler and companion bytecode interpreter) 35 years later, it's still the predominant solution for that domain.

Anyway, OP made his decision - I think a wise one.

BTW, were I still using my 2012 i7 Mini for builds, I would employ a Ramdisk. It approximately halves build time for me on the Mini. I tried it on my new iMac Pro, but did not have the same impact. I'm afraid I didn't think to try the ramdisk until I got the iMac Pro. MacOS doesn't really have great RamDisk solutions. The Mini has 16GB. There's no margin for a ramdisk on a machine with 4GB. (The iMac Pro has 64GB).
 

vbctv

macrumors 6502a
Sep 25, 2013
886
687
Cleveland, OH
Does MacBook Pro use system memory for the display?

8GB surely is not enough on - for example - a Mac Mini, as a pretty good chunk (depending on model) of that is used for the display.

Most important feedback given here is that on recent MacBooks, memory is soldered down. You are making a decision for the next several years.

I have a 2018 mac Mini hooked to 2 monitors and have 8GB RAM, I never see any issues and do both Android Studio & Xcode development work plus run MAMP Pro in the background. The memory pressure monitor never really goes up and always stays green and low. I’ve been debating an upgrade to 16GB but I don’t really see a need unless I find a killer deal on sale....
 

ChromeCloud

macrumors 6502
Jun 21, 2009
359
840
Italy
I found most replies so far to be misleading.

When I try to use my MacBook Air with 4GB of RAM to develop iOS apps (I'm talking real apps, not just small demo projects), the experience gets pretty frustrating very fast. Just opening Xcode and Safari with 3 or 4 tabs will completely saturate your RAM (remember the system by itself takes about 2GB) and using the simulator to debug your apps is pretty much impossible (the computer slows down to the point of becoming unresponsive).

With 8GB you're gonna be OK. But not for long. Let's say 8GB is the minimum to run comfortably the full iOS development suite + a couple of apps on the side if you want to have like a fancy text editor or some tools to make vector graphics for example.

So, if I had to buy a new machine now and keep it for the next 3 years or more, I'd get at least 16GB of RAM.

Another word of caution: I would never have anticipated this a few years ago when I bought my iMac (which has 32GB of RAM and it's my main workstation), but it looks like if you want to run the simulator without the whole GUI stuttering, VRAM (aka video memory) also plays an important role in the equation.

For a retina iMac, a 2GB video card is not going to be enough to run everything smoothly: every few seconds the buffer gets full (I only experience this while running the simulator though) and the iMac freezes for a fraction of a second while it gets emptied and filled again. It's super annoying.

So my recommendation for something on which you can work comfortably for the next 3 years is: 16GB of RAM (or more) + 4GB of VRAM (or more).
 
  • Like
Reactions: Emanuel Rodriguez

mkelly

Cancelled
Nov 29, 2007
207
218
8 GB is enough for today, as long as you aren't running virtual machines. 16 GB is probably the sweet spot if you are looking at the laptop lasting 4-6 years. 32/64 GB is overkill unless you are running a lot of VMs simultaneously, or have money to burn.
 

multitudes

macrumors newbie
Feb 12, 2019
6
6
Xcode is heavy on the CPU less on RAM. I just bought a Mac mini 2018 i7 6 cores and when I compile iOS and Swift in Xcode the CPU in the activity monitor goes to 90%!
In the same application I can see that the RAM usage is below 8 GB with no swap. For later Im thinking of update the RAM but I am in no hurry at the moment.
 

FilipeTeixeira

macrumors regular
Mar 10, 2013
153
152
It should be more than enough. Often it's only a problem when you work with languages such as R or so. Because those languages often tend to load everything into the memory, meaning that with large datasets, the more RAM you have the better it will perform.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.