I've been using Safari 5.1 for a while now, and for the most part I like it, except for a memory/swap management problem I've been seeing whenever I start to tax it.

Safari 5.1 separates the renderer from the rest of the browser, and runs the renderer in its own process, sandboxed from the computer. This is a security change; if someone discovers and exploits a bug in the renderer, it can't be used to do things like execute code or download files.

The problem seems to be in how Safari manages memory for the renderer. When I open a lot of windows or tabs (I will often have 40-50 sites open at a time) and when I'm low on memory (for example, running Photoshop and InDesign at the same time as Safari), my disk use will skyrocket and Safari will slow to a crawl. And when I say "slow to a crawl," I mean put one word on the screen, then put up the spinning beachball for 15-20 seconds, then draw another word, then put up the beachball again.

Looking at Activity Monitor when this happens shows that Safari and Safari Web Content (the renderer) keep trading spots for the top CPU usage. The number of pageouts skyrockets. It seems that what is happening is the system is swapping the renderer into memory, rendering a small part of the page, swapping the renderer out to disk and swapping Safari into memory, displaying what it's rendered, swapping Safari out to disk and the renderer into memory, rendering the next bit of the page, and so on.

Anyone else noticed this issue?


Photo gallery, all about me, and more: www.xeromag.com/franklin.html