Does Safari make Macs sluggish?

“Macenstein.com has an interesting article about a slowdown in other applications when a Safari window with a specific set of pages is loaded in the background. What a browser should do when it is the background application is actually extremely complex, and not all of the decisions are as clear-cut as they might seem,” Dave Hyatt blogs for Surfin’ Safari.

Hyatt explains, “Before I drill into the specifics of what a browser does with background Web pages, I’d like to first state that it’s dangerous to jump to any general conclusions when the sample set of pages is very small. In the example article cited above, the author visited five Web sites and clicked around within them. It’s possible that this pathological behavior is specific not just to one Web site but possibly even to one specific page on that Web site. In order to identify the problem it would be better to try the test again with each individual page.”

Hyatt writes, “One might expect that a background browser window would do nothing. However, that is a fairly naive assumption once you take a look at the kind of Web content that exists today. There are many ways in which a browser can still be doing required work even while in the background. Here are some examples:”

• Animated GIFs
• Plugins
• JS Timeouts and Interval
• Marquees
• XMLHTTPRequests
• The Back/Forward Cache

Hyatt writes:
A few other final points to make are:
(1) Browsers rarely get served the same content, even on very popular sites. Without spoofing it’s hard to know if Safari is being served some buggy content from one of the pages in question.
(2) A small sample set isn’t enough to draw general conclusions. Try a bunch of other different Web sites and see if a slowdown still occurs. If so, then maybe there is a systemic problem. Until then, though, all we know is that something is hogging CPU in one of five Web pages.
(3) Reduce reduce reduce! Reduce the problem if possible. Cut it down to one page. Don’t go back/forward (just go right to the pages instead of clicking through to them).

Provide us with precise steps to reproduce and we can verify what the problem is and fix it very quickly. In fact, it may have already been fixed!

Full article here.

[Thanks to MacDailyNews Reader “davecc” for the heads up.]

MacDailyNews Take: Dave Hyatt is employed by Apple Inc. as part of the development team responsible for the Safari web browser and WebKit framework. He was part of the original team that shipped the beta releases and 1.0 release of Safari. Hyatt is currently the Safari and WebKit Architect.

76 Comments

  1. I have noticed that I need to quit Safari every few days because it has slowed down, and seems to affect other apps as well. As the article states, that may simply be too many cute animated ads, gifs, etc. on various pages that get into caches or otherwise hog memory. It would be nice if Safari could allow for preference settings to stop animations, etc. from playing on and on, but instead stop after a certain number of replay.

  2. If I have multiple tabbed webpages open and leave the machine in that state for a long time 12-24hrs. I get an extreme overall machine slowdown. I find the solution is often times to quit Safari and start anew. This hinders web development, research, or any activity whereby the user needs to have many webpages up for a long duration.

  3. I just recently downloaded the Beta version of camino (1.1) and I can totally notice a difference in speed from Safari.

    Camino also shows all of your bookmarks that you put in the bookmark bar by using more than one bar. Safari hides ones that it cannot fit onto one bar and you have to click that arrow on the right to see the rest of them. I end up forgetting about them altogether. Kinda annoying.

    Camino has my vote!

  4. I have a response. Safari has memory leaks. It’s been a know issue for a long time. Firefox has the same problem as Safari. In either of these browsers when you have multiple windows open after a while you begin to notice a large slow down across your system. I can easily keep multiple windows open in Opera without issue. Why don’t I just use Opera and stop complaining? Because Opera sucks and I love Safari. Despite the memory problem I still think that it’s the best browser out there and as long as I close down Safari every night it’s not that noticeable. I just wish that Apple could come up with a better solution to fix the slow down than “Reduce reduce reduce! Reduce the problem if possible. Cut it down to one page.”

  5. Safari’s RAM allocation seems to creep up gradually to the point where I need to quit it every few days because I start to notice a general system slowdown (particularly if there are a lot of webpages open). It was particularly bad on my old 12″ PB.

    Try opening Activity Monitor after you’ve had Safari open and busy for a few days and check out the ungodly amount of RAM it’s using.

  6. I’ve got something. I agree with dave. I experience the same problems on different pages. While I know you should reduce reduce reduce, sometimes I find safari struggling with 3+ tabs open (all of which i’m using at the time).

  7. I have all but given up on Safari due to the number of endless beachball spinnning slowdowns, forced quits and random crashes. Even though I find Firefox to be buggy at times, it is, for me a much more stable and faster browser.

  8. I good machine to test this on would be a slow (old) Mac, like a 500 MHz G4 – something still usable with Tiger and the latest Safari, but easy to overload. I have a machine like that, and I notice background browser windows causing a slowdown. And not just with Safari. On my dual-core G5 Power Mac, I cannot perceive a difference from background browser windows being there.

  9. Dave Hyatt rocks. It’s just so awesome that the head of the Safari development team is so accessible on the web, and transparent about Safari issues. How many other major apps out there have their dev head saying that their app is less than perfect, and then being so specific about what the issues are? We hear of J. Allchin’s issues with MS problems, but only in court.

  10. iHerodotus,

    Hyatt wasn’t suggesting that users have as few windows open as possible; he was hoping that the macinstein guy that found the bug could reduce the issue down to as few variables as possible. The fewer the variables, the easier to isolate and fix.

  11. The instruction to “reduce, reduce, reduce” is NOT the workaround to get Safari to run faster. It is to pinpoint the problem. If you find Safari bogging down, see if you can determine which page (or minimal set of pages) that cause(s) the problem. Then report it to Apple. They will examine Safari’s behavior vis-a-vis the specified page(s) and determine what they can do to improve performance.

  12. A slow website (I have very fast cable broadband) server can drag down the rest of Safari and sometimes other apps. I have multiple bookmarks grouped in tabs and surf by groups, loading multiple sites at a time. If a site is slow to lead, like Think Secret’s 10.5 gallery yesterday, it can slow the loading of other tabs with good server response. I do not see the same thing in FireFox, so it should be fixable.

  13. Safari definitely slows my G4 Dual 1GHz down once in a while and Safari sometimes practically stops. To get out of the situation I just restart the app and continue browsing smoothly again. With the newer machines it’s not that noticeable.

  14. You quit “every few DAYS”???

    Here’s a nutty idea: Why don’t you just quit Safari when you’re not using it? I don’t leave any application on when I’m finished with it. Quit the thing, let the OS clean up. A clean system is a happy system. That’s true for any OS.

    And yeah, Safari can be a drag. On our G4 iBook, if I need to switch into my account, I always ask my wife if I can quit her Safari session first. If I don’t do that, the iBook is sluggish as hell with two user sessions and two Safaris going.

  15. I think the problem lies in WebKit. Firefox has always run faster than Safari on my Macs, but version 2.0 (2.0.0.2) runs much slower than 1.5 did. I’m hoping one of these two browsers runs better under Leopard.

    Also, I hate the way Safari deals with bookmarks. Why do they have to be displayed as a webpage in the main browser window? Why can’t there be a drop-down menu of bookmarks like every other browser in this world?

  16. I have had numerous slowdowns when using Safari with a few tabs, and it takes forever to switch from one tab to another. I’ve tested 5 other browsers (Opera, Shiira, Omniweb, Firefox, Camino) and Camino is by far the best of the bunch (Firefox has bugs and looks awful, Opera looks awful, Omniweb is too big), and Camino is a million times more responsive than Safari when working with tabbed browsing. (Shiira is also very fast, but has a few annoying bugs, so Camino gets my vote).

  17. My experience is similar to “tclash”, Safari get snapper after a restart. Why can’t Safari run more like Firefox?

    What I wonder is why does the Apple calendar take so long to open? I wish some one at Apple would look at making the calendar more crisp?

  18. LordRobin: “Here’s a nutty idea: Why don’t you just quit Safari when you’re not using it? I don’t leave any application on when I’m finished with it. Quit the thing, let the OS clean up. A clean system is a happy system. That’s true for any OS.”

    People like leaving their frequently used apps open because we don’t have to wait for the launch time to finish. Sometimes, you want to leave a window open without having to bookmark it, quit, re-launch later and delete the bookmark. Frankly, a well designed app can be left running in the background without consuming much resources. The need to quit an app and re-launch it just to clear up memory leaks tells you that there are problems with the app.

    That said, browser apps have become bloatwares. All of them. I use Firefox because the way it handles Pages Not Found due to edits in /etc/hosts better, but Firefox has a very bad memory leak.

  19. Of course Safari makes your Mac sluggish.

    The reason for this is that all the associated caches go into memory (some of them needlessly) and your mac ends up using your hard drive as a memory device (now you’re really sluggish).

    Here’s a time-tested method: clear out the following files or directories completely once in while
    (every couple days if you wish):

    # Locations of Safari related files
    /Users/YOU/Library/Caches/Safari/
    /Users/YOU/Library/Caches/Metadata/Safari/
    /Users/YOU/Library/Safari/Icons/
    /Users/YOU/Library/Safari/History.plist

    # Locations of other garbage files
    /Users/YOU/Library/Caches/Java Applets/cache/
    /Users/YOU/Library/Caches/Quicktime/
    /Users/YOU/Library/Caches/Sherlock/
    /Users/YOU/Library/Caches/TextEdit/
    /Users/YOU/Library/Icons/
    /Users/YOU/.Trash/

    # Location of any broken printer files with dash-numbers, eg. HP-1, HP-2; (can be a real CPU hog)
    /Users/YOU/Library/Printers/

    Notice there are other garbage files above that slow you down. Have fun now.

  20. I have to turn Safari off every now and again on my 1.5GHz G4 Powerbook. It has got worse over time – sometimes i have to go away and make a coffee while the beachball spins and the hard drive goes mad. Its not only a question of background windows – it also happens with only 1 or 2 windows on occasion…

    I have deleted all the gargage files (thank you checksum) and will see if this helps…

    Also Safari crashes more frequently than I would like…

  21. One of the things that bugs me about Safari is that there is no “Home” button. Secondly, bookmarks are all put into a page rather than an easy access menu, and removing them means you also have to go back to this page. Why are bookmarks not intuitive like every other browser?

    I have to use IE at work, and all my PC’s have Firefox. Safari works except for these issues whch are enough for me to move to Firefox, or perhaps I’ll try Opera. It works well on the Wii!!!

  22. Glad Safari’s sluggishness wasn’t just my imagination; especially noticeable on an older machine. Web based bloatware has evidently has succeeded in making Safari require as much data throughput as a TV.

  23. I tend to load multiple windows with multiple tabs in Safari, and I can always tell when Safari jumps up its foreground and background usage.

    (1) Sites with banner ads, which I don’t block, because that command also blocks sites with very nice headers;
    (2) sites with lots of javascript, guaranteed to rev Safari’s engine
    (3) PDFs (I preferred it when Safari just downloaded them) now that they get read in line, they often choke Safari after closing the window; and
    (4) Having more than 10 tabs open in a window.

    I can’t say why, but my daily blog list includes 31 sites. If I select open all in tabs, which I normally do, Safari either needs to be shutdown or the computer restarted to get it back to its fast and furious state. But if I just select my top ten from the list and open those, I can keep going, so long as I don’t hit more than 10 simultaneous tags.

    But some sites code just suck, and then they add ads into the mix. One site I visit daily, Safari practically has to chew threw to get it to display, and then they f*cking reload to display ads. Great content, idiot developers.

  24. I’ve had Safari open for many days now, and Activity Monitor tells me it’s using 491MB of real memory and 1.25GB of virtual. This with only the MDN page open, that’s all. I quit it and brought it up again and this time real memory is 50MB and virtual is 400MB.

    I’ve also noticed long page load times with Safari. I’ll see in the status bar that it’s loaded like 62 of 66 items, and there it sits for many seconds. Why can’t it show me what it’s got so far? I could be reading SOMEthing while it loads up those few remaining ads.

    I was going to also complain about those annoying textual pop-ups, or whatever they’re called. You know, you just so happen to have your mouse on top of one of them and it pops up some stupid ad that blocks what you’re reading. (Really makes me wanna go buy something from them, ya know?) Anyway, my complaint was that quite often when one pops up and I move my mouse away to make it leave, it doesn’t. I have to mouse over another one and let that one pop up then move away from that one. Is that Safari’s fault, or MDN’s? Or the advertiser? And now that I’ve restarted Safari I can’t find any of those annoying thingies, not here on MDN or in any other web site I frequent. That is certainly not a complaint, but it does puzzle me why they disappeared.

    RambleMode = Off

  25. Switcher: “One of the things that bugs me about Safari is that there is no “Home” button.”

    Um. I’m looking at my Home button in Safari right now.

    Right click on a button you do have, choose Customize Toolbar and then drag the Home button to the buttons row.

  26. Attn: Switcher

    Right-click on Safari’s tool bar. Choose Customize. Add a Home icon, or any of many others.

    And you said, “…bookmarks are all put into a page rather than an easy access menu.”

    They all show up in a menu named “Bookmarks” on my Safari. I’ve never seen any other person’s Safari not have that menu.

  27. It’s not necessarily just the web apps, but also the sites. Some sites are just loaded with “dynamic” crap that will only serve to bog down any system, no matter how powerful.

    And yes, badly coded Flash is one of the most flagrant culprits. But also deficient JAVAscript calls, ill-crafted XML, buggy AJAX implementations, etc.

    You name it. The poor web apps, like Safari, are only saying- “Don’t shoot me, I’m only the piano player.”

  28. I have every utility, application, document and file on my Mac open 24/7-my system runs very slowly.
    I do this because I don’t want to waste 3 seconds opening an application, so instead I waste the 1/2 hour it takes finding and switching to the file/application/utility I need.

    It also allows me to gather with a bunch of others and whine about my self caused problems.

  29. When I noticed that havin multiple tabs open a long time with Safari, I decided that closing Safari once in a while might be a solution. But I hate to have to close tabs I know I will need the next day or I want to read in a minute. SO I got Safari Stand that lets you open Safari with the same windows and tabs you had the last time (as long as Safari was closed and didnt crash). Opera has that feature built in and I really missed it. But Safari Stand is fine and for those who dont like it, there are several other tools around :9

  30. I used Safari for a few months (at least) when I first got my PowerBook. At that time, my impression of the machine was that it was pretty slow. Then, I started using Firefox. Since then, I have had no issue with the speed of the same machine, and I get far far far fewer pinwheels of death. Everything else is the same. Firefox also has the great extensions that Safari doesn’t have.

  31. To the not-real Cubert above (I think you were trying to quote me or something), the answer to your question is “yes”. I imported them from Firefox.

    The other feature of Firefox that I love is the ability to click and hold on a link to bring up the contextual menu so I can choose to open the link in a new tab or a new window. You can’t do this in Safari. You have to command-click to do it. If I’m using a mouse, I’m using a mouse and don’t want to be mixing in keyboard shortcuts. And, yes, I use keyboard shortcuts extensively each day, so that’s not the issue.

  32. Does Sulfuri make Mucks sluggish?

    On the defense of Crapapple Computer Incorporated (hereafter called FUD) of Cupertino (hereafter called Hell), I, William Henry Gates III, hereby testify that Sulfuri does not make Mucks sluggish. My explanations pertaining to the aforesaid statement have not been tested and do not require testing because they have been proven true by the user feedback given to FUD, graciously publicized by Mr. Steven Paul Jobs (hereafter called the Devil), about Muckintosh OS X, especially the current release, 10.4 Tigger. The explanations follow within the proceeding text.

    1. Muckintosh computers are already so poorly rated in the “responsive” criterion by former users that any theoretical “friction” in the processor caused by Sulfuri would make no apparent difference whatsoever.

    2. If someone (perhaps the Devil) was to prove that Sulfuri did make a Muckintosh slower, then he could be proven oblivious to the numerous viruses that savaged the computer. Also, Tigger can host 20 viruses at once and still be deemed “normal” by the average Muck user. Therefore, the fraudulent claim would be dismissed.

    3. Sprinkling table salt on the common MuckBulk will not cause it to shrivel up in agony, or even assist the MuckBulk in its attempt to do so (crap!). However, it should be mentioned that the salt particles may pass through the keyboard and corrupt all of the key underlying circuit boards over a period of approximately 10-20 minutes.

    For the reasons that have been gathered by FUD user feedback and released by the Devil (as aforementioned), I renounce the movement of sluggards that brainlessly conclude that Sulfuri makes Mucks sluggish. These words have been truthfully stated in the defense of FUD of Hell.

    I am now willing to discuss the design of FUD’s diseased iPox and that of its intellectual superior, the Zune.

    Your whining. Our wealth. Microsoft.

  33. Safari Version 2.0.4 (419.3) left open continually takes more ram memory. I work from the computer all day and I regularly quit and reopen Safari on my MBP with 2 gigs of ram. Safari, after looking in Activity Monitor can approach 1 gig of memory after extended use. So I make it a habit of quiting and reopening all day long.

    It’s fun to watch too. Open Activity Monitor and just see Safari’s memory grow and grow.

    Is this what’s called a memory leak?

  34. I didn’t notice too much of a speed change between Firefox and Safari, but the trial version of Omniweb seems to fly.
    I did several test where I would click a link in Safari, and then the same one in Omniweb, which would usually open first, even though it was clicked second.
    Of course, there’s more to a browser than speed, so I’m not sure that I will be buying Omniweb. Maybe a later version, depending also on Leopard.

  35. First of all, there IS a Home button. You have to add it by way of the “Customize Address Bar” window.

    Safari has always been a RAM hog. It grabs hundreds of MB in just a few hours on my Intel iMac with 2GB RAM. The more you have, the more it takes! This behavior will slow down any machine eventually. I’ve sent bug reports on this issue to Apple til I’m blue in the face, but to no avail. I now quit Safari whenever I’m done with it for the moment. It launches so fast that, unless I’m saving a bunch of open tabs, there’s no benefit to leaving it running. The next version of Safari may have an option to relaunch Safari the way you left it, which would be cool.

  36. I will chime in on the memory leak complaints — Safari needs to be restarted every couple days or it bogs everything down.

    The people who are whining about the bookmarks interface, however, need to try actually using a few brain cells. If you put your bookmarks in the right folder, they will all show up the bookmarks drop-down menu, including subfolders, just like other browsers. This would take probably 5 minutes to figure out if they’d just try.

  37. Vaguely related but almost Off Topic: (It is related to one post about clearing cache for faster speed)

    There is a problem with occasionally clearing Cache and Safari, and it is not necessarily Safari’s fault. Never the less, clearing cache can cause log in problems with some sites. The “Remember me” button as it relates to cache on some sites refuses to take again in Safari once the cache has been cleared.

    http://www.vbulletin.com/forum/bugs36.php?do=view&bugid=1116
    http://www.askandyaboutclothes.com/forum/showthread.php?t=61034

  38. As a Windows ME user these posts have given a real insight into daily Mac use. The idea of browser problems has never even occurred to me. I mainly use Firefox on Windows for its cute plug-ins – one of which is a button to switch straight to Internet Explorer when Firefox can’t handle a site. No slowdowns, no crashes under heavy use – and all on seven year old system with a bad reputation. It’s Vista or Ubuntu for me next.

  39. @Grandtheft

    Everyone’s experience is different: people just use their computers differently. If you are happy with a 7 year old PC running Windows ME then you are probably not engaging in the sort of activity that is causing the problems that Safari users on here are describing. Which is not to say Safari is perfect, but it is mostly pretty good. I think, also, that most Apple users dont often shut down – Apple notebooks are very tolerant of sleep mode, unlike the windows machines i had previously.

    Firefox is popular on the Mac platform also – I use Opera for a few sites which were written in non-standards-compliant code and don’t therefore work with Safari.

    It may not have been intentional, but your post sounds like you have summed up the Mac experience from reviewing a few posts about Safari problems. That would be a shame. If you ask anyone who has switched from Windows to Mac they will tell you they are not likely to switch back. I am sure you can find a few to ask – 9,000 people a week are making the switch apparently,..

    You won’t, I imagine, be installing Vista on your 7 year old hardware… And if you are buying a new machine, I recommend you think seriously about a Mac. You won’t be disappointed…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.