Closed Bug 1001426 Opened 10 years ago Closed 2 years ago

60--80 MiB memory overhead on start-up with Adblock Plus

Categories

(Core :: JavaScript Engine, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: RyanVM, Unassigned)

References

Details

(Whiteboard: [MemShrink:P2])

Attachments

(4 files)

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
Same procedure and profile as above, but with a recent Aurora build off TBPL.
Same baseline data as the two diffs above, just comparing the startup memory usage of trunk vs. aurora since I've got it.
And after ABP enabled
Whiteboard: [MemShrink] → [MemShrink:P1]
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.
(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.
Whiteboard: [MemShrink:P1] → [MemShrink]
> 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.
Summary: 150MB memory usage spike by enabling Adblock Plus → 60--80 MiB memory overhead on start-up with Adblock Plus
Whiteboard: [MemShrink] → [MemShrink:P2]
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.