Last Comment Bug 1001426 - 60--80 MiB memory overhead on start-up with Adblock Plus
: 60--80 MiB memory overhead on start-up with Adblock Plus
Status: NEW
[MemShrink:P2]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86_64 Windows 7
-- normal with 16 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on: 988266
Blocks: abp
  Show dependency treegraph
 
Reported: 2014-04-25 07:05 PDT by Ryan VanderMeulen [:RyanVM]
Modified: 2016-05-01 02:59 PDT (History)
32 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
memory diff before/after enabling (7.18 KB, text/plain)
2014-04-25 07:05 PDT, Ryan VanderMeulen [:RyanVM]
no flags Details
memory diff before/after enabling with recent Aurora build (6.06 KB, text/plain)
2014-04-25 07:21 PDT, Ryan VanderMeulen [:RyanVM]
no flags Details
diff of trunk vs. aurora after startup (6.27 KB, text/plain)
2014-04-25 07:24 PDT, Ryan VanderMeulen [:RyanVM]
no flags Details
diff of trunk vs. aurora after abp enabled (5.11 KB, text/plain)
2014-04-25 07:25 PDT, Ryan VanderMeulen [:RyanVM]
no flags Details

Description User image Ryan VanderMeulen [:RyanVM] 2014-04-25 07:05:10 PDT
Created attachment 8412601 [details]
memory diff before/after enabling

Recently, I noticed that my fairly modest Firefox session (4 pinned tabs) was using over 600MB on startup, which is much higher than it used to. After debugging for awhile, I was able to track it down to Adblock Plus being the main source.

On a session with only Treestatus, Add-ons Manager, and about:memory loaded, the memory usage jumped by 150MB within seconds of enabling Adblock Plus. This doesn't appear to be the same as bug 988266 as style-sets only account for ~5MB of the increase. It mostly looks like a big pile of JS stuff.

Adblock Plus is configured with up-to-date EasyList and EasyPrivacy lists enabled and nothing else.

Attached is a diff of about:memory before and after enabling Adblock Plus. I made sure to minimize memory usage before saving both reports.

Build config:
Built from http://hg.mozilla.org/mozilla-central/rev/98e0a9b57414

--enable-application=browser --enable-official-branding --enable-optimize=-O2 --target=x86_64-pc-mingw32 --host=x86_64-pc-mingw32 --enable-debug-symbols --disable-debug --disable-mochitest --disable-tests --disable-accessibility --disable-crashreporter --disable-parental-controls --disable-safe-browsing --disable-updater
Comment 1 User image Ryan VanderMeulen [:RyanVM] 2014-04-25 07:21:42 PDT
Created attachment 8412613 [details]
memory diff before/after enabling with recent Aurora build

Same procedure and profile as above, but with a recent Aurora build off TBPL.
Comment 2 User image Ryan VanderMeulen [:RyanVM] 2014-04-25 07:24:50 PDT
Created attachment 8412617 [details]
diff of trunk vs. aurora after startup

Same baseline data as the two diffs above, just comparing the startup memory usage of trunk vs. aurora since I've got it.
Comment 3 User image Ryan VanderMeulen [:RyanVM] 2014-04-25 07:25:49 PDT
Created attachment 8412618 [details]
diff of trunk vs. aurora after abp enabled

And after ABP enabled
Comment 4 User image Nicholas Nethercote [:njn] 2014-05-13 22:44:59 PDT
I can reproduce. The base difference at start-up appears to be about 60--80 MiB (on Linux64), and that gradually increases with the number of iframes (although style-sets increases much more quickly, as mentioned in bug 988266).

I just wrote a blog post about ABP's effect on Firefox's memory usage (https://blog.mozilla.org/nnethercote/2014/05/14/adblock-pluss-effect-on-firefoxs-memory-usage/), in order to raise awareness of this issue.
Comment 5 User image Nicholas Nethercote [:njn] 2015-06-29 22:02:51 PDT
(In reply to Nicholas Nethercote [:njn] from comment #4)
> I can reproduce. The base difference at start-up appears to be about 60--80
> MiB (on Linux64), and that gradually increases with the number of iframes
> (although style-sets increases much more quickly, as mentioned in bug
> 988266).

The style-sets problem (bug 988266) has now been fixed thanks to heycam's work in bug 77999.
Comment 6 User image Nicholas Nethercote [:njn] 2015-06-29 22:04:54 PDT
> The style-sets problem (bug 988266) has now been fixed thanks to heycam's
> work in bug 77999.

As a result of this, I've retitled this bug so it's just about the fixed overhead, which I measured (in comment 4) to be about 60--80 MiB on Linux64.

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