28

I usually have several tabs open in Safari in the background, and sometimes I see it taking up an unusual amount of CPU (PluginProcess or WebProcess).

How can I figure out which tab (or tabs) is causing this? If there are no easy GUI solutions, I'm also open to Terminal-based techniques for finding the culprit. I hope not to have to do this very often.

(Note: I realize this is similar to an old question, but Safari has been updated since then and perhaps there are new techniques available.)

  • did you find a solution for yourself in the meantime? I'm having the same problem, but mainly for excessive use of RAM which seems to be triggered by some few tabs: apple.stackexchange.com/q/125290/5887 – MostlyHarmless Mar 23 '14 at 11:44
  • @MostlyHarmless check out the answer below: apple.stackexchange.com/a/127111/85985 @ jtbandes: please mark the mentioned answer as correct, as the one you marked, doesn't contain any solution – Ichixgo Feb 8 '16 at 23:54
  • @Ichixgo: Thanks, as I am still using OS 10.6.8, I can not use Safari 6.1 – MostlyHarmless Feb 9 '16 at 10:43
  • 1
    @MostlyHarmless: Too bad, maybe you wanna check out Chrome. It still runs on 10.6 and you can also check which tabs are hogging your CPU. Window > Taskmanager from the drop down menu. – Ichixgo Feb 11 '16 at 0:16
14
  1. You need Safari 6.1 or newer

  2. Enable Debug menu.

Update: For Mac OS Mojave and newer, go to System Preferences > Security & Privacy > Privacy > Full Disk Access and add Terminal before entering the command.

    defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
  1. Set "Use Per-tab web processes" and "Show Web process IDs in page titles" to on.

screenshot

2

For what it’s worth, I’ve checked both the Develop menu and the Debug menu in the latest Safari.app (Version 5.1.4 / 7534.54.16), and couldn’t find any helpful features.

Develop menu:

Debug menu:

The debug menu can be enabled using the following command:

defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
2

cmd ⌘+alt ⌥+AWindow > Activity may help you to identify which tab is the heaviest in activity if it is lasting long enough.

I must admit that all my tests where failure, but I'm mostly using web servers which are fast.

I also tested Debug > Show Frame Rate Meter (see Mathias Debug dropdown menu) which is a partial answer to the original question. You have to test it by reloading every tab and compare the output of the 3 meters to see who is the hog.

1

The Activity Monitor app provides entries for individual Safari tabs. You can search for “Safari” in it to see just Safari-related processes, including all its tabs, and sort by CPU percentage to see which ones are active.

Unfortunately, each process name only includes the domain of the URL, rather than the full URL, so it can be a bit tricky to work out which tab it is if, like me, you have lots of pages open from the same domain.

(I’m on macOS Sierra 10.12.6 and Safari 10.1.2; I’m not sure when this was introduced.)

Activity Monitor app, with process

  • 1
    nonetheless it gives you a very good hint to figure out what is going on, thanks! – Edoardo Mar 31 '18 at 6:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .