Speed Up Safari!!

Posted:
in Mac Software edited January 2014
This was a hint posted over at macosxhints.com and it's impact is tremendous.



Quote:

Anyone else notice that Safari has been getting slower and slower over time? In my case the most striking example was that I became unable to open a page in a new tab without getting a beach ball until it finished loading. This was happening on 2 machines since I upgraded to Panther (both clean installs) and I even got so frustrated I completely reinstalled Panther on one of the machines. It appears that Safari's declining performance isn't attributable to poor engine performance, so much as a lack of proper garbage collection.



Over time, Safari stores more and more info in your user's Library/Safari folder. Even though you can "reset" Safari, this doesn't clean up everything. In my case, the offending garbage was the "Icons" folder that stores every favicon you have ever come across. I manually deleted this folder, which removed hundreds of files and folders from my machine and Safari. Once they were trashed, Safari was back to it's old speedy self.



It would be nice if Apple could add some garbage collection to clean this up, but until then you can manually delete it or write an AppleScript to do it for you



It did exactly what it claims to do. I was running into the beachball phenomenon repeatedly, but this solves it. You can add a rolling crontab to remove old favicons, too.

Comments

  • Reply 1 of 15
    torifiletorifile Posts: 4,024member
    Funny that I just did the same thing. I was having problems on one particular website, fatwallet.com, loading slow as sin in Safari. I thought it was a problem with bad code or something, but other browsers weren't slow on it. I deleted that folder and now I have favicons back for AI (which had been gone for some time - since I first reset the cache) and it's fast on that site. Pretty cool. Good tip.
  • Reply 2 of 15
    cam'roncam'ron Posts: 503member
    what is a favicon? is it that icon in the address bar?
  • Reply 3 of 15
    mcqmcq Posts: 1,543member
    Quote:

    Originally posted by Cam'ron

    what is a favicon? is it that icon in the address bar?



    Yep, that's what it is.
  • Reply 4 of 15
    chrisgchrisg Posts: 239member
    Wow...amazing. Safari went from 5+ bounces down to 1. There were about 2000+ folders/files in there. Its very strange how Safari stores the icons.
  • Reply 5 of 15
    scottscott Posts: 7,431member
    My Safari goes out of control. I'll have one window open maybe AppleInsider and Safari will have the CPU pegged. I think it's a Java error.
  • Reply 6 of 15
    ebbyebby Posts: 3,110member
    Worked for me too. Although it wasn't that slow on my dual G5 in the first place.
  • Reply 7 of 15
    othelloothello Posts: 1,053member
    now that is the daddy!!



    excellent!
  • Reply 8 of 15
    I had a similar bug with pages containing text entry boxes. Safari would beachball for ten seconds at a time. Deleting ~/Library/Safari/Form Values or turning off auto fill seems to do the trick.
  • Reply 9 of 15
    Thanks! I was getting really annoyed at Safari's slowness lately, this seemed to do the trick! All my favicons are gone though. Let's hope this bug is fixed in the next update..
  • Reply 10 of 15
    Quote:

    Originally posted by fiddler

    Thanks! I was getting really annoyed at Safari's slowness lately, this seemed to do the trick! All my favicons are gone though. Let's hope this bug is fixed in the next update..



    Yeah, I expected the icons to return as I visited sights, but that doesn't seem to be happening. What gives?
  • Reply 11 of 15
    jasonvpjasonvp Posts: 33member
    How about this one from a command prompt:



    $ cd ~Library/Safari

    $ mv Icons Icons.ORIG

    $ ln -sf /dev/null ./Icons



    I haven't tried this yet, but if deleting the Icons folder works, this should too. And it'll prevent Safari from ever rebuilding it. I proposed moving the existing Icons directory to a backup (Icons.ORIG) just in case the logical link thing in step 3 didn't work. If it doesn't, delete the link and move the directory back.



    jas
  • Reply 12 of 15
    dfilerdfiler Posts: 3,420member
    Just deleted the contents of /Library/Safari/Icons

    Safari does indeed perform better.



    Better yet... i discovered that it was caching old versions of the favicons.

    AI's now looks like a square with ai on the inside. Before, it was a badly aliased monochrome apple.
  • Reply 13 of 15
    Quote:

    Originally posted by dfiler

    Better yet... i discovered that it was caching old versions of the favicons.

    AI's now looks like a square with ai on the inside. Before, it was a badly aliased monochrome apple.




    Wow! You've been using a cached icon for months!!



    That said, this "fix" only fixes some slow-downs. Safari still chews up 100% CPU and slows to a crawl when there are multiple animations on a page (ala the Smilies on the reply page here).



    *pats OmniWeb* Good boy.
  • Reply 14 of 15
    mattjohndrowmattjohndrow Posts: 1,618member
    thank you, thank you, thank you!!!!!!!! i had a bajillion folders in there!
  • Reply 15 of 15
    meecesmeeces Posts: 160member
    Okay, so it helped some for sure. But had a strange side affect. I dumped the folder wed. night, and it took until thursday night for the generic favicons to show up. Weird.
Sign In or Register to comment.