Last Comment Bug 787690 - Significant increase in Peak Memory Use Firefox 15 with add ons
: Significant increase in Peak Memory Use Firefox 15 with add ons
Status: NEW
[Memshrink:P3]
:
Product: Firefox
Classification: Client Software
Component: Extension Compatibility (show other bugs)
: 15 Branch
: x86_64 Windows 7
: -- normal with 2 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks: hueyfix
  Show dependency treegraph
 
Reported: 2012-09-01 09:52 PDT by Nigel
Modified: 2016-02-12 11:56 PST (History)
15 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
addons.txt (2.71 KB, text/plain)
2012-09-01 09:52 PDT, Nigel
no flags Details
Plugins (86.40 KB, image/jpeg)
2012-09-01 12:20 PDT, Nigel
no flags Details
Memory state after start up only about memory opened (166.25 KB, text/plain)
2012-09-06 00:59 PDT, Nigel
no flags Details
Memory state - email, bugzilla and memory page (183.07 KB, text/plain)
2012-09-06 01:00 PDT, Nigel
no flags Details
About Memory (219.24 KB, application/gzip)
2014-01-30 22:46 PST, Nigel
no flags Details
add an attacment private.png (47.29 KB, image/png)
2014-06-03 03:27 PDT, Wayne Mery (:wsmwk, NI for questions)
no flags Details

Description Nigel 2012-09-01 09:52:17 PDT
Created attachment 657573 [details]
addons.txt

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0
Build ID: 20120824154833

Steps to reproduce:

Looked at a few web pages - have noticed that memory use with Addons has dramatically increased with Firefox 15 compared to Firefox 14



Expected results:

Memory use is advertised that its reduced with Firefox 15 - does not appear to be the case.  Peak memory is definately higher
Comment 1 Mardeg 2012-09-01 09:56:03 PDT
You have attached a list of your plugins, but no extensions.

Please click the "Copy all to clipboard" button in about:support and paste into a comment here (or attached as another text file)
Comment 2 Loic 2012-09-01 10:22:42 PDT
In addition type about:memory?verbose in the location bar when you're observing a huge memory use and copy all the memory log (ctrl+a/ctrl+c) then attach the log here (as .txt e.g.).
Comment 3 Nigel 2012-09-01 12:20:01 PDT
Created attachment 657595 [details]
Plugins
Comment 4 Nigel 2012-09-01 12:20:24 PDT
sorry forgot to add this
Comment 5 Loic 2012-09-01 12:24:12 PDT
We want the list of add-ons (like Adblock Plus, Noscript, Videodownload Helper etc), not the list of plugins (like Flash, Java, Quicktime etc). :)

Type about:support and copy the list/array of add-ons.
Comment 6 Nigel 2012-09-01 12:34:15 PDT
That was in the first attachment loaded
Comment 7 Loic 2012-09-01 12:57:36 PDT
Your 1st attachment shows only your plugins.
Comment 8 Nigel 2012-09-02 07:02:47 PDT
Application: Firefox 15.0 (20120824154833)
Operating System: WINNT (x86-msvc)

- Adblock Plus 2.1.2
- Advertising Cookie Opt-out 1.5
- Ant Video Downloader 2.4.7.1
- avast! WebRep 7.0.1466 (Disabled)
- Beef Taco (Targeted Advertising Cookie Opt-Out) 1.3.7
- BetterPrivacy 1.68
- Bookmark Favicon Changer 1.65
- British English Dictionary 1.19.1
- Clear Cache Button 0.9f
- Collusion 0.16.3
- Configuration Mania 1.16.2012081001
- DoNotTrackPlus 2.2.1.611
- Download Statusbar 0.9.10
- Extension List Dumper 1.15.2
- Google Analytics Opt-out Browser Add-on 0.9.6
- GoogleSharing 0.22 (Disabled)
- Master Password Timeout 0.3.1
- Menu Editor 1.2.7
- NewTabURL 2.2.3
- Print Edit 8.6
- ReloadEvery 13.0.0
- Saved Password Editor 2.6.3
- Undo Closed Tabs Button 3.7.1
- Wallflower 1.4
- WebDAV Launcher 1.0.6
- Windows Media Player Extension for Firefox 1.1 (Disabled)
Comment 9 Nicholas Nethercote [:njn] 2012-09-04 16:37:58 PDT
Bug 778318 was similar -- GreaseMonkey was doing something odd and bug 695480 caused its memory consumption to skyrocket.  It's possible that one of the listed add-ons has a similar problem.  Are  you able to narrow it down to a particular add-on by selectively disabling them?  That would help enormously.
Comment 10 Nicholas Nethercote [:njn] 2012-09-04 19:42:05 PDT
Also, it would be interesting to know if you are getting any messages in the error console that say "TypeError: can't access dead object".
Comment 11 Nigel 2012-09-04 23:31:19 PDT
(In reply to Nicholas Nethercote [:njn] from comment #10)
> Also, it would be interesting to know if you are getting any messages in the
> error console that say "TypeError: can't access dead object".

The main error is

Timestamp: 05/09/2012 07:29:32
Error: TypeError: gBrowser.getBrowserForDocument is not a function
Source File: chrome://antbar/content/grabber/queryobserver.js
Line: 68
Comment 12 Nicholas Nethercote [:njn] 2012-09-04 23:38:12 PDT
> The main error is
> 
> Timestamp: 05/09/2012 07:29:32
> Error: TypeError: gBrowser.getBrowserForDocument is not a function
> Source File: chrome://antbar/content/grabber/queryobserver.js
> Line: 68

What do you mean by "main"?  Is it occurring most frequently?

Are you getting *any* "can't access dead object" messages?  If not, that would be surprising, because it would (in theory) rule out bug 695480, which is the most likely cause.
Comment 13 Nigel 2012-09-04 23:44:06 PDT
Looking at the Error Console - last time I looked that was the only error seen.

However just restarted, logged into email (webmail) and this page and saw the following

Timestamp: 05/09/2012 07:42:12
Error: An exception occurred.
Traceback (most recent call last):
  File "resource://jid1-f9uj2thwoam5gq-at-jetpack/api-utils/lib/tabs/tab.js", line 71, in _onReady
    this._emit(EVENTS.ready.name, this._public);
  File "resource://jid1-f9uj2thwoam5gq-at-jetpack/api-utils/lib/events.js", line 119, in _emit
    return this._emitOnObject.apply(this, args);
  File "resource://jid1-f9uj2thwoam5gq-at-jetpack/api-utils/lib/events.js", line 149, in _emitOnObject
    listener.apply(targetObj, params);
  File "resource://jid1-f9uj2thwoam5gq-at-jetpack/api-utils/lib/windows/tabs.js", line 102, in _emitEvent
    tabs._emit(type, tab);
  File "resource://jid1-f9uj2thwoam5gq-at-jetpack/api-utils/lib/events.js", line 119, in _emit
    return this._emitOnObject.apply(this, args);
  File "resource://jid1-f9uj2thwoam5gq-at-jetpack/api-utils/lib/events.js", line 149, in _emitOnObject
    listener.apply(targetObj, params);
  File "resource://jid1-f9uj2thwoam5gq-at-jetpack/collusion/lib/main.js", line 374, in null
    var domain = getDomain(ioService.newURI(tab.url, null, null).host);
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIURI.host]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://jid1-f9uj2thwoam5gq-at-jetpack/api-utils/lib/cuddlefish.js -> resource://jid1-f9uj2thwoam5gq-at-jetpack/collusion/lib/main.js :: <TOP_LEVEL> :: line 374"  data: no]
Comment 14 Nigel 2012-09-04 23:46:48 PDT
However looking at peak and operating memory - without logging into web mail, and doing a Firefox restart within the extensions page, noticed that the addon thats causing the significant jump both in peak working memory and memory private working is Add Block Plus - In the order of 100+MB with three subscriptions...
Comment 15 Nigel 2012-09-04 23:50:15 PDT
Confirmed by restarting that AddBlock Plus is the culprit - over 100MB just for it - whereas in Firefox 14 the hit was not as significant.  Peak with 440MB without 302MB.  Startup Peak with 320MB without 220MB
Comment 16 Nigel 2012-09-04 23:58:21 PDT
Noticed that Ablock Lite also has the same issues
Comment 17 Kris Maglione [:kmag] 2012-09-05 10:53:31 PDT
Did you ever provide the output of about:memory?verbose that you were asked for? I don't see it anywhere.
Comment 18 Kris Maglione [:kmag] 2012-09-05 11:22:07 PDT
Under what circumstances are you seeing this? In Firefox 14, I'm seeing about 50MB overhead from ABP, whereas in 15 I'm seeing 60MB. Neither number is what I'd call ideal, but the difference does not look especially significant.
Comment 19 Nigel 2012-09-06 00:58:47 PDT
Attached file

Note that I am currently running after logging into Bugzila, my email and about memory page - with the following 

PEAK 450 MB (used to be around 330MB) Memory Private 291 MB.  Using Task Manager
Comment 20 Nigel 2012-09-06 00:59:33 PDT
Created attachment 658814 [details]
Memory state after start up only about memory opened
Comment 21 Nigel 2012-09-06 01:00:17 PDT
Created attachment 658815 [details]
Memory state - email, bugzilla and memory page
Comment 22 Kris Maglione [:kmag] 2012-11-01 16:57:49 PDT
Nigel, I'm lost as to the problem here. Without any web pages open, you've only got about 140MB of explicit allocations. It's a bit higher with web pages open. I don't see anything unexpected here. Is this memory footprint growing over time? Is it significantly better without add-ons?
Comment 23 Nigel 2012-11-01 22:47:13 PDT
Hi Chris - the issue is that the memory settles - but the start up memory ramps up dramatically to over 190MB and then drops.

This morning my peak working memory is 446,564k while memory private is 314,700K.

Looking yesterday peak was near 1GB while private was 600,000k - thats with the same addons, and having cleared all tabs except the google home page, and having done a memory refresh.  I regret that I did not do a verbose memory dump then!

Issue still exists with Firefox 16.0.2
Comment 24 Danial Horton 2012-11-03 05:43:21 PDT
Private Working set is misleading in the sense it only accounts for process allocated memory, while the Peak Working Set(Memory) actually refers to the maximum reported value in the Working Set(Memory) column at any given time, which is amusingly not enabled by task managers default settings.

Working Set(Memory) refers to the process+shared memory's iirc, and is always larger than Memory(Private Working Set)

TL;DR
Peak Working Set refers to the highest recorded value of memory used by the Process and Shared Memory at any given time.
Comment 25 Wayne Mery (:wsmwk, NI for questions) 2014-01-29 14:00:37 PST
(In reply to Nigel from comment #23)
> Hi Chris - the issue is that the memory settles - but the start up memory
> ramps up dramatically to over 190MB and then drops.

I wouldn't think that's a problem.

Do you still see this issue when using a current version of firefox?
If you do, please supply output of about:memory and URL.
Comment 26 Nigel 2014-01-30 22:46:35 PST
Created attachment 8368420 [details]
About Memory
Comment 27 Nigel 2014-01-30 22:48:06 PST
The report was after startup and opening two pages.  Typically browsing is to bbc.co.uk and also https://www.google.co.uk/finance?client=ob&q=LON:BP
Comment 28 Nigel 2014-06-01 11:52:43 PDT
This still exists with Firefox 29.0.1 

Can't see why this has been put as resolved - reopening it
Comment 29 Phoenix 2014-06-01 12:11:19 PDT
Can you share current about:memory report?
Comment 30 brunoais 2014-06-02 06:04:35 PDT
I would share but it has loads of private information inside, unfortunately. I don't know how to filter it so that the private information does not show.
Any clues?
Comment 31 Wayne Mery (:wsmwk, NI for questions) 2014-06-02 12:37:25 PDT
(In reply to brunoais from comment #30)
> I would share but it has loads of private information inside, unfortunately.
> I don't know how to filter it so that the private information does not show.
> Any clues?

When you do "Add an attachment" you can chose to make the comment and attachment private to the core-security group.
Comment 32 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2014-06-02 12:41:06 PDT
You could also just remove all the URLs from it.
Comment 33 brunoais 2014-06-03 01:04:23 PDT
Wayne: I can't find such option.

kayle: My private information is beyond just URLs.
Comment 34 Wayne Mery (:wsmwk, NI for questions) 2014-06-03 03:27:44 PDT
Created attachment 8433248 [details]
add an attacment private.png

(In reply to brunoais from comment #33)
> Wayne: I can't find such option.

see this screen shot
Comment 35 brunoais 2014-06-03 06:00:53 PDT
There's no such option available to me.
Comment 36 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2014-06-03 19:19:31 PDT
(In reply to brunoais from comment #35)
> There's no such option available to me.

Since everything else is failing, if you send the report directly to me at my @mozilla.com email address I can promise that I will not present anything private from the report and will delete it from my system after I have investigated it.
Comment 37 brunoais 2014-06-04 05:00:10 PDT
As long as it does not reach the general public with the confidential data, it's fine. In this case, it's not for your eyes only, you may pass to a Mozillean technician if you need help analysing it. (more info in the e-mail)
E-mail sent.
Comment 38 Grover Wimberly IV [:Grover-QA] 2016-01-12 11:32:08 PST
Hi Nigel,

Are you still having issues with memory peaks in newer versions of Firefox? We're looking to make some final actions on this bug if necessary. Thanks!
Comment 39 Grover Wimberly IV [:Grover-QA] 2016-01-12 11:33:20 PST
Hi Kyle, 

We're looking to triage this bug. Any suggestions/recommendations on where this should go?
Comment 40 Nigel 2016-01-12 22:46:11 PST
(In reply to Grover Wimberly IV from comment #38)
> Hi Nigel,
> 
> Are you still having issues with memory peaks in newer versions of Firefox?
> We're looking to make some final actions on this bug if necessary. Thanks!

Hi Grover

I just looked at Windows 10 Task Manager Details tab and added the Peak memory column to view.
Firefox 43.0.4 is running with 301 MB however to open with its addons - reduced from the last list, the peak was 459MB.  From testing the worst addon was ad block plus.

I restarted with all adons - extentions disabled - and the base numbers were 179MB with two tabs open and peak of 285MB.

The extension that seemed the worst was ad block plus, however I also normally have enabled as well, Ant Video downloader, Beef Taco, BetterPrivacy, BookMark FavoriteIcon Changer, Clear Cache Button, Configuration Mania, Master Password Timeout Updated, newtaburl, Print Edit, Saved Password Editor, Undo Closed Tabs Button 



I still feel there is an issue.
Comment 41 Grover Wimberly IV [:Grover-QA] 2016-01-22 09:59:59 PST
Cleaning up the Untriaged list and triaging as Extension Compatibility. Developers, if you feel this isn't the right triage, please triage as you see fit. Thanks.
Comment 42 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2016-01-22 10:05:10 PST
I'm not really working on memory stuff right now, maybe njn has some ideas on what to do here.
Comment 43 Nicholas Nethercote [:njn] 2016-01-24 16:03:03 PST
Users with lots of add-ons often have higher memory usage due to one or more of those add-ons. There's generally not much we can do about that, unfortunately. In this case the extra memory usage doesn't seem all that high to me.

I'm happy to leave the bug open but I would consider it a low priority because it's a moderate problem in a unique configuration.
Comment 44 Wayne Mery (:wsmwk, NI for questions) 2016-01-24 17:45:07 PST
personally (In reply to Nigel from comment #40)
> (In reply to Grover Wimberly IV from comment #38)
> > Hi Nigel,
> > 
> > Are you still having issues with memory peaks in newer versions of Firefox?
> > We're looking to make some final actions on this bug if necessary. Thanks!
> 
> Hi Grover
> 
> I just looked at Windows 10 Task Manager Details tab and added the Peak
> memory column to view.
> Firefox 43.0.4 is running with 301 MB however to open with its addons -
> reduced from the last list, the peak was 459MB.  From testing the worst
> addon was ad block plus.
> 
> I restarted with all adons - extentions disabled - and the base numbers were
> 179MB with two tabs open and peak of 285MB.
> 
> The extension that seemed the worst was ad block plus, however I also
> normally have enabled as well, Ant Video downloader, Beef Taco,
> BetterPrivacy, BookMark FavoriteIcon Changer, Clear Cache Button,
> Configuration Mania, Master Password Timeout Updated, newtaburl, Print Edit,
> Saved Password Editor, Undo Closed Tabs Button 
> 
> I still feel there is an issue.

This amount of usage sounds quite normal, and the increases you are seeing are entirely caused by addon. I don't think there is anything here in Firefox worth persuing
Comment 45 Danial Horton 2016-01-24 21:48:50 PST
(In reply to Nicholas Nethercote [:njn] from comment #43)
> Users with lots of add-ons often have higher memory usage due to one or more
> of those add-ons. There's generally not much we can do about that,
> unfortunately. In this case the extra memory usage doesn't seem all that
> high to me.
> 
> I'm happy to leave the bug open but I would consider it a low priority
> because it's a moderate problem in a unique configuration.

A great deal better then it was back then.
Comment 46 Nigel 2016-01-25 19:17:16 PST
(In reply to Danial Horton from comment #45)
> (In reply to Nicholas Nethercote [:njn] from comment #43)
> > Users with lots of add-ons often have higher memory usage due to one or more
> > of those add-ons. There's generally not much we can do about that,
> > unfortunately. In this case the extra memory usage doesn't seem all that
> > high to me.
> > 
> > I'm happy to leave the bug open but I would consider it a low priority
> > because it's a moderate problem in a unique configuration.
> 
> A great deal better then it was back then.

The situation is better, however its still not brilliant.  Both Firefox itself and extensions require up to 50% more memory when starting than in the settled state
Comment 47 Grover Wimberly IV [:Grover-QA] 2016-02-12 11:56:42 PST
Although this issue cannot be reproduced on my end, due to the amount of comments from developers, I will be changing the bug from Unconfirmed to New.

Note You need to log in before you can comment on or make changes to this bug.