I have a mid-2012 Macbook Pro 13, 2.5 GHZ, non-retina, with 4 GB RAM, running Mavericks. I occasionally get the swirling beach ball when running various applications, such as XCode and iPhoto (not necessarily at the same time), and the overall speed of the computer isn't impressive. However, when I look at my memory pressure, it is almost always in the green. The virtual memory is in the 5 GB - 6 GB range, for what it's worth. Will upgrading the RAM to 8 GB help the overall speed of the machine, or does the memory pressure tell me everything is fine concerning RAM?
It might be different depending on what type of app you are using, but generally speaking, it sure is beneficial to update from 4 GB to 8 GB since 4 GB is not a lot for a Mac and you are using Xcode.
The iPhoto app might not change much, because it has to load lots of photos, its latency depends more on the disk instead of the memory.
The value of virtual memory might not be very informative, you should look more at swap used right below virtual memory, this is the memory that is actually stored on the disk since the physical memory is not enough.
If you see that swap used is often more than zero, your priority should be absolutely to change for 8 GB memory. Otherwise, installing a SSD might be a better choice though that's more expensive...
Generally speaking, I would recommend upgrading the memory over upgrading to a SSD.
A SSD affects only the loading speed of things, that is, the time that it takes for the computer starts up or for an app to load itself. But the size of memory affects the speed of apps when you are opening lots of them.
On the Mac, the concept is switching more and more to holding the app inactive in the background instead of closing them completely, that enables the apps to respond quickly since we don't have to load them again from disk.
Despite Apple's memory compression technology, opening lots of apps still takes a considerable amount of memory, so upgrading the memory prevents the mac to swap some memory to disk, and makes the mac faster when you have lots of apps in the background.
You would notice the spinning ball a lot less. Having more memory wont necessarily increase the speed of your computer, but it will help with running multiple applications at the same time.
Currently you may be experiencing "slowness" because your computer memory has reached the limit. You are then forced to wait for memory to free up, hence the swirling ball.
Increasing the amount of memory, would prolong the swirling ball, until 8gb of memory are full.
Ram is not your issue. Probably permissions issues, rogue preference files, or some rogue application/process causing the slowdowns.
Beachballs have nothing to do with ram. It means, for some reason, the application isn't responding. This is usually because of high CPU utilization (faces in iPhoto comes to mind) or an application blocking the main thread.
I also use Xcode, iPhoto and Aperture... on a 2008 Macbook Pro with 4 gigs of ram. The only time i've seen massive beach balling everywhere was upgrading from snow leopard to lion (instead of a clean install).
Before buying anything, i'd go grab Onyx http://www.onyxmac.com and see if it cleans up your problems. Also if you do not have at least a 7200rpm drive, i'd upgrade that before the ram Preferably to an SSD. OS X is pretty IO hungry for things that aren't cached. Eventually you'll need at least 8 gigs. That would help a lot if you have a large iPhoto library.