Many people (including myself) seem to be suffering from an intense and extremely irritating slow-down problem with Safari. This is mainly characterised by a huge lag between doing anything, for example, clicking on a link in a page, and the actual action taking place. In this example the 'clicked' link goes red (as it does), but
stays red for a long time, and then the beachball spins and the waiting begins. This waiting is small initially but then progressively climbs as time passes until it gets up into the tens of seconds to
minutes long. That may not sound like much but in 'computer responsiveness time', it is an ice age and one that seriously impacts the usability of Safari! Other simple things like attempting to scroll the window produces the same effect - pause, spin, wait, curse, action (finally).
1) It takes a period of time for the problem to manifest - for me it always seems to be a few days.
2) After noticing the first signs of the problem, it continually gets worse and worse over time until Safari becomes utterly unusable.
3) Monitoring file system use (using lsof) shows nothing going on at that level, i.e. no caching to disk, or other unusual disk activity.
4) Processor use however goes through the roof for the period of waiting (like 80% or 160%+ with two processors).
5)
Very important :- Any and all symptoms of the problem are completely removed via quitting Safari and then restarting it. (Note. this is of great importance because it hints that there is no problem with any of it's current support files, e.g. favicon caches, page caches, plist file, etc. - none of these things greatly change between quit and restart, i.e. they're still present and as they were two seconds later when Safari is relaunched, at which point it works perfectly again until the next time the problem begins...).
What Works?
1) Switch javascript off in Safari's prefs - I had occasion to try this during a particularly serious case of the slows...; BAM, instant dodge viper performance! - back to normal in fact, just like a fresh launch. Well, clearly the cause has been found...
2) Clean the Java caches - Others (including yourself JNK) have reported similar successes. (I've not confirmed this to myself as yet because I've been too busy enjoying a Safari that lasts over a day or two...)
So, there we have it, two clear winners on this weird issue. And whilst you're quite correct Fran that they're two different things, so far they share a strange similarity as successful 'solutions' (and also provide hints to the source of the problem).
JNK - It's not desperately bad with javascript off but what you will find is that you'll browse to some page somewhere and click on a link and nothing happens, you'll wonder what's going on, then you'll notice "run script()" or some such in the 'status bar' at the bottom of the window and the penny will drop: switch javascript back on and reload the page to get back full functionality. Sometimes a page won't look right at all, bit's missing, overlapped text, that sort of thing, again - switch it back on and reload. This switching on and off can be somewhat speeded up by using the associated keyboard shortcuts.
As for the memory leaks thing - I'm not convinced the two problems are related at all now, but using the above technique I've managed to have Safari running and usable non stop for 12 days now! Anyone want to know what the leaks are up to at this point?:
<pre><small>
Process 206: 3447558 nodes malloced for 500605 KB
Process 206: 52956 leaks for 2238128 total leaked bytes.
</small></pre>