Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Wirelessly posted (iPhone 4: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5)

My safari has been open for days and it is only using around 300MB. That's including all of the safari processes.
 
It appears certain content set it off more than others. I don't have time to parse what elements are doing it but 2 Gizmodo pages will eat up, not kidding, 850MB from a fresh state. Constant page loads and tabs on macrumors gave me an additional 25MB. So everyones milage will most likely vary. It is indeed the core though as multiple webkit nightly's don't seem to have any effect on memory management. I tested today's and going back as far as when 5.1 branched.
 
I should mention that I do have one 3rd party plug in installed, and that is Flash. Also no problems with Flash either, I'm using the new version Beta 11.

Hugh

I don't have Flash installed on my system and the memory leak happens with me. I have a few plugins (adblock and others) and the difference is not that noticeable.

If disabling javascript sorts the problem, it means it's not (too much) caching related. The problem relies in webkit2.

While Apple doesn't fix it, I'll buy more RAM from Newegg. 2GB is not enough for Lion.
 
I don't have Flash installed on my system and the memory leak happens with me. I have a few plugins (adblock and others) and the difference is not that noticeable.

If disabling javascript sorts the problem, it means it's not (too much) caching related. The problem relies in webkit2.

While Apple doesn't fix it, I'll buy more RAM from Newegg. 2GB is not enough for Lion.

It's has to have something to do what I'm doing different then you, since I don't have a memory leak. Again I'm not using any plug-ins other then Flash.

Just for giggles post some of the web sites that you go to, and see if I get memory leaks from them.

Hugh
 
Websites that rely heavily in javascript use a lot of RAM. Some more than others.

-Gmail, I see the RAM usage increase 200mb. I'm not counting the other pages or Safari itself, that's for gmail alone.
-LifeHacker the same, around 200mb. [Open it with Opera make it unresponsive. Chrome stable at 30mb.]
-Google Finance stays around 10-15mb.
-Apple Trailers 10-15mb.
-Reuters 15-20mb.
-Wired 10-20mb.
-Smashing Magazine 10mb.

For what I understand, some websites are poorly coded, optimized or not optimized. Memory leakage come from some specific websites. In this examples Gmail and LifeHacker works fine with webkit (Safari 5.0 and Chrome) but not on webkit2 and Opera's one (don't know the engine's name). Didn't test in Firefox.

I think we shouldn't blame Apple but contact support from the websites we visit and explain the problem using Safari 5.1. Chrome is going to migrate to webkit2 sooner or later so Gmail might be fixed soon.
 
Last edited:
So it is starting to look like extensions are major hogs for me at least. I did a bunch of tests with 4 same tabs loaded with and without popular extensions turned on or off. This says nothing about reclaiming successfully after hours of browsing but I found it interesting:

No extensions (4 Sites): 169MB
w/ Click2Flash: 178MB
w/ 1Password 3.7b7: 286MB
w/ Adblock: 288MB
w/ All 3 on: 419MB
 
It seems I found a way to dramatically reduce Safari's memory footprint on my machine. All I had to do was to disable Top Sites and turn off the 2-finger page back/forward gesture.
 
This memory leakage problem with Safari is probably my most frustrating experience with Lion. That and sometimes my dock is inaccessible. I have to swipe back to my desktop and then I can get to it. That's not good at all.

I upgraded to Lion after a clean SL install. Then used migration. 4GB of RAM isn't enough for Lion if you're using Safari! The snappiness of it disappears quickly.
 
This memory leakage problem with Safari is probably my most frustrating experience with Lion. That and sometimes my dock is inaccessible. I have to swipe back to my desktop and then I can get to it. That's not good at all.

I upgraded to Lion after a clean SL install. Then used migration. 4GB of RAM isn't enough for Lion if you're using Safari! The snappiness of it disappears quickly.

I did a clean install, and am experianceing no problems at all.
But I also do not have flash installed. The clean install seems to be the most relevant fact.
Safari using 88 Mb.
Safari web content using 77 Mb.
 
Same experience here.

I've had Lion installed since day one so I know Spotlight is not indexing. When I have Safari open for long periods of time, the memory usage is through the roof! I had Google Plus and Facebook open for several hours and the memory usage was 2.7GB. I could barely use any other apps - the system was sooooo slow. At that point Safari would not close and I had to hard-reboot the system. Finder was even locked up.

I do not have Flash installed - I only use the Flash in Chrome - so I know it wasn't related to that buggy resource hog...
 
I've had Lion installed since day one so I know Spotlight is not indexing. When I have Safari open for long periods of time, the memory usage is through the roof! I had Google Plus and Facebook open for several hours and the memory usage was 2.7GB. I could barely use any other apps - the system was sooooo slow. At that point Safari would not close and I had to hard-reboot the system. Finder was even locked up.

I do not have Flash installed - I only use the Flash in Chrome - so I know it wasn't related to that buggy resource hog...

The buggy resource hog is Safari.
 
My Safari issues are now resolved

Restored Safari 5.0.5 onto my desktop from a SL backup, I now have both so can see how the new one improves

I will just use 5.0.5 from now on, works perfect
 
I did a clean install, and am experianceing no problems at all.
But I also do not have flash installed. The clean install seems to be the most relevant fact.
Safari using 88 Mb.
Safari web content using 77 Mb.




That is indeed the lowest i've heard thus far.
 
Is anyone having big memory leak problems in Safari 5.1 on Lion?


Narh, actually not - so far, greatly improved from SL, where i saw it seconds after opening a tab with MR and 9to5 - until i disabled Flash, greatly improved, but the leak came just later; seeing often 2GB leak for Safari alone. Terrible.
But now, in Lion, not the same problem - the different engines are still demanding for their stuff though, specially Flash *sigh*

Hopefully, these mac fora's and webpages will go more onto HTML5, and forget that Flash - it might be good for something, and thats good - i just haven't found that yet :cool:
 
Narh, actually not - so far, greatly improved from SL, where i saw it seconds after opening a tab with MR and 9to5 - until i disabled Flash, greatly improved, but the leak came just later; seeing often 2GB leak for Safari alone. Terrible.
But now, in Lion, not the same problem - the different engines are still demanding for their stuff though, specially Flash *sigh*

Hopefully, these mac fora's and webpages will go more onto HTML5, and forget that Flash - it might be good for something, and thats good - i just haven't found that yet :cool:

The awful memory leaks in Safari have nothing to do with Flash. It's a poorly coded browser.
 
And apparently, so is Flash - and those two things combined = even worse for us endusers

Nope. Chrome Canary + Flash = no memory leaks. No slowdowns. No problems. Safari + Flash = huge memory leaks. Safari and no Flash = huge memory leaks. Safari = huge memory leaks.
 
It's a huge problem for me, extensions or no extensions. It's Safari.

Which sucks, because I really want to use Safari. But there's no way I can handle losing 2.5 gigs of RAM to one or two tabs of normal web pages.

I'm off Safari until this is resolved. Which I doubt will even happen. This sucks.
 
My Safari issues are now resolved

Restored Safari 5.0.5 onto my desktop from a SL backup, I now have both so can see how the new one improves

I will just use 5.0.5 from now on, works perfect

That's weird because you are still running the webkit2 5.1 core for the rest of the rendering on your OS. How did you restore webkit1 systemwide?
 
Safari Web Content: Real Memory: 173.0MB CPU: 2.7%
Safari: Real Memory: 119.7MB CPU: 0.8%

Also to note Safari has had a number of lockups.
 
That's weird because you are still running the webkit2 5.1 core for the rest of the rendering on your OS. How did you restore webkit1 systemwide?

Still seeing Safari use a lot of RAM, but it doesn't get slow over time now with 5.0
also the issue with marking topics as read in forums when swiping back is resolved (think only some people saw this)
and that annoying refresh issue when swiping back, causing a delay of a couple of seconds (again think only some saw this issue)

5.0 is working like it did in SL for me, not ideal as don't like to use the older version, but it works without issues

All I did was (didnt want to mess up system totally by restoring old apps)
restored Safari.app from time machine and placed in on the desktop
added this to dock, removing other Safari

So I now have both versions
 
Still seeing Safari use a lot of RAM, but it doesn't get slow over time now with 5.0
also the issue with marking topics as read in forums when swiping back is resolved (think only some people saw this)
and that annoying refresh issue when swiping back, causing a delay of a couple of seconds (again think only some saw this issue)

5.0 is working like it did in SL for me, not ideal as don't like to use the older version, but it works without issues

All I did was (didnt want to mess up system totally by restoring old apps)
restored Safari.app from time machine and placed in on the desktop
added this to dock, removing other Safari

So I now have both versions

OK. You're running a "shell" 5.0.5 over the top of your 5.1 core. Mail and the rest will use the 5.1 engine and 5.0.5 is using some of the 5.1 as well. Not "really" running 5.0.5.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.