How to find out which Firefox tab is using most CPU or memory?

36

7

There are times when the Firefox responds reluctantly. And it is not only when I have opened many tabs. But there are cases when I have opened as many as 20 tabs and Firefox is working fine and there are cases when I have opened just 5-6 tabs and Firefox behaves lazy.

So, I guess it do not depend on the number of tabs and there must be a specific tab which causes the problem. Isn't there a way to find that tab out and close only that instead of closing Firefox completely1? Is there an addon for that, or a script?

Rakesh Juyal

Posted 2011-03-28T17:03:41.397

Reputation: 1 793

Question was closed 2016-01-27T01:45:12.310

9This isn't a duplicate as this asks about CPU and memory (the linked to question just asks about CPU). For CPU go to the page about:performance , for memory go to the page about:memory. – Matthew Wilcoxson – 2016-07-11T10:48:48.347

Answers

7

The BarTab extension for Firefox (not available for the latest Firefox versions) might be useful for improving the situation:

BarTab can intercept when tabs are loaded in the background or restored after a browser restart and will only load the content when the tab is actually visited. It also allows you to free memory by unloading already loaded tabs, either manually or automatically.

Otherwise, you might switch temporarily to Google Chrome, where Shift + Esc displays the per-tab usage:

Image

harrymc

Posted 2011-03-28T17:03:41.397

Reputation: 306 093

3Not available in Firefox 40. – Ricardo Martins – 2015-08-19T00:01:34.573

BarTab seems promising. I don't use Chrome as it is not having those addons which i like. – Rakesh Juyal – 2011-04-01T06:47:07.830

Please note: Not currently available for Firefox 11.0 – Nathan Koop – 2012-04-13T18:31:52.633

@NathanKoop: FF compatibility has become rather meaningless with the current version speedup. I use the Add-on Compatibility Reporter to untangle the mess.

– harrymc – 2012-04-13T18:42:17.537

2https://addons.mozilla.org/en-US/firefox/addon/bartab-lite-x/?src=search - works for 17.01 – Enigma – 2013-03-01T18:18:56.347

13

Opening the browser to about:memory can show per-tab memory usage.

Further reading

Jeff

Posted 2011-03-28T17:03:41.397

Reputation: 1 647

8

For Firefox, I've made an addon which displays tab memory usage in the corresponding tab's title.

It provides user with tab related stats and memory usage...

https://addons.mozilla.org/firefox/addon/tab-data/

Screenshot

Features

  • How many tabs are currently open
  • How many tabs have been opened during this Firefox session
  • How many tabs have been opened since the addon was installed
  • Displays tab memory usage in title
  • Preference to toggle tab memory usage on/off
  • Preference to set interval between memory usage collection

bobbyrne01

Posted 2011-03-28T17:03:41.397

Reputation: 209

13Do you know ANY way to find out even a hint as to which TAB (or even relevant URL) is eating CPU? – tbone – 2015-03-15T17:54:15.743

Afraid I don't at the moment, but once I find out I plan on including that data in the addon too. – bobbyrne01 – 2015-03-18T17:56:07.180

I'll ask since you may have the knowledge....these various addons that "unload" tabs - in my experience, they seem to visually unload them, but Firefox doesn't give up any of that memory; or, when you restart Firefox, it seems to eat all of the memory required for the opened tabs, even before you click on each one and it loads (implying they are being physically loaded in the background, but not displayed). Would you happen to know if this IS in fact the situation? – tbone – 2015-03-18T20:28:01.640

1@bobbyrne01 I am using your addon right now! Good stuff. – AntonioCS – 2015-09-27T21:47:53.307

@tbone Firefox doesn't give up any of that memory: Unless each tab is running in a separate process, I suspect this is a limitation of the operating system's memory management in that it won't "give back" the memory it uses (depends upon the operating system of course and also how Firefox itself handles memory). Check the Electrolysis wiki page: Theory: If I am using Electrolysis, and I close a tab, I believe that should terminate the separate operating system "process" that houses that tab and its consumed memory.

– bgoodr – 2016-03-12T18:18:15.347

@bgoodr I'm sorry but that idea that an application is literally unable to release memory is.....a bit hard to believe. – tbone – 2016-03-13T18:32:45.797

@tbone Let me clarify that when I said "give back": Applications can allocate and deallocate memory, but that does not necessarily mean that memory is immediately reused by the operating system for other processes memory needs. It may or may not depending upon how the operating system in question manages memory. Reference "high water mark" http://superuser.com/a/549692/106977

– bgoodr – 2016-03-15T03:14:10.483

@bgoodr I don't see the relevance of a "high water mark" of memory usage here. The point I am getting at is: why when using FF add-ons that claim to "unload" tabs (or when restarting FF and tabs are open but not "loaded") is that memory seemingly not freed up? – tbone – 2016-03-16T18:07:52.537

3@tbone about:performance shows per-tab CPU usage. Matthew's comment on the main question covers this, but it doesn't show up as a reply here and is waaay underrated. – mgjk – 2016-11-26T13:52:03.053