logoalt Hacker News

qingcharlesyesterday at 9:48 PM1 replyview on HN

Does Safari use less RAM because it shares some parts with the rest of the OS? (e.g. in the same way Edge probably uses a bit less because half of its components are already idling on the OS)


Replies

LoganDarkyesterday at 10:47 PM

You could say that. WebKit is in the dyld shared cache, so all of Safari's subprocesses share the same copy of it (and JavaScriptCore, etc.) in memory. But I would say it's more efficient because it integrates better with the platform's QoS primitives. I'm not sure what Firefox does in that regard, other than stuff from other platforms that don't have QoS (such as the throttling of JavaScript APIs like timers). Safari seems better at prioritizing the tabs you have open and backgrounding everything else, letting things go to swap, killing resource hogs, etc.