How to: Decrease memory usage in Safari for 30% and more
Hi guys!
Here is my personal tip on how to decrease the (sometimes enormous) amount of memory Safari eats on OS X Lion.
One of the reasons Safari eats so much memory is because it's running in 64-bit mode by default and that can be easily tweaked.
You can set Safari to run in 32-bit mode, thus it will be able to access up to 4 Gb of RAM - which is more than enough for daily use.
How to do that:
1) Open Applications folder in Finder, find Safari app
2) Right-click (or Ctrl-click) on Safari
3) Select Get Info from popup menu
4) Enable "Open in 32-bit mode" checkbox
5) That's not all, you'll also need to set the WebProcess app to run in 32-bit mode - that's a sandboxed application for Safari pages and is actually the main memory hog. Snow Leopard has WebProcess.app only on the latest versions of Safari.
6) Right-click Finder icon in Dock, select Go To Folder..
7) Copy and paste this string:
/System/Library/StagedFrameworks/Safari/WebKit2.framework/
- that's for Lion
(in Snow Leopard and Mountain Lion - /System/Library/PrivateFrameworks/WebKit2.framework/ )
8) In a new window find WebProcess.app and set it to run in 32-bit mode like you just did with Safari
9) That's all - now make sure that Safari and WebProcess are showing like "Intel" instead of "Intel 64 bit" in System Monitoring app.
The memory usage decreased in about 30% in my case, I didn't test it alot though! Good luck!