Iframe irony: Adblock Plus is probably the reason Firefox and Chrome are such memory hogs

Status
Not open for further replies.

Petrovic

Level 64
Thread author
Verified
Honorary Member
Top Poster
Well-known
Apr 25, 2013
5,355
Here’s a lovely bit of irony for you: Adblock Plus, which is by far the most popular add-on for Firefox and Chrome, is actually increasing the amount of memory used by your web browser, rather than decreasing it. Furthermore, ABP also increases the amount of time (and CPU cycles) required to render a website. Instead of making web surfing more responsive, ABP actually makes your surfing experience slower.

This might seem counterintuitive at first — after all, ABP blocks all of those annoying animated Flash ads from loading, and so it should save you from unnecessary memory and CPU hits. Unfortunately, the actual situation is a lot more complex than that. Basically, ABP has grown too big for its own good, and just the very process of running ABP in your web browser consumes more memory and CPU cycles than it saves.


How Adblock Plus works

To begin with, according to Mozilla developer Nicholas Nethercote, there is a 60-70MB memory hit having Adblock Plus run in the background on Firefox. The main problem, though, is the process by which ABP actually blocks ads. Basically, ABP inserts a massive CSS stylesheet — occupying around 4MB of RAM — into every single webpage that you visit, stripping out the ads. This wouldn’t be a problem if we were still in the ’90s or early ’00s, but nowadays it is very common for a webpage to have lots of iframes, which are separate, individual webpages that are loaded and embedded within the page you’re currently looking at. The most common example is the ubiquitous social sharing widget (Facebook, Twitter, etc.) which is actually an iframe containing a separate webpage hosted on Facebook/Twitter’s servers.

You can probably see where this is going. On a modern website, there can be dozens of iframes. On the ExtremeTech homepage there are 10, which is pretty low. In Nethercote’s testing, he found that TechCrunch used around 194MB of RAM without ABP enabled — but that doubled to 417MB with ABP enabled, after triggering all of the social widgets. In an extreme example, the VIM Color Scheme Test website — which has hundreds of iframes — goes from a few hundred megabytes of memory to almost two gigabytes. Nethercote only tested ABP’s memory consumption in Firefox, but we performed the same test in Chrome and got the same results.


Chrome memory usage, lots of iframes, Adblock Pro disabled


Chrome memory usage, lots of iframes, Adblock Pro enabled

It’s harder to measure the CPU hit from having ABP enabled, but after some non-scientific testing it definitely feels like websites render more slowly with ABP installed. My CPU fan spins up more often when ABP is enabled, which is usually a good indicator that the CPU is being hit hard.

The irony, of course, is that ABP’s initial popularity stemmed from its ability to block noisy, annoying, and resource-hogging Flash ads. Now, because ABP’s block list is so large, it probably consumes more RAM and CPU cycles than it saves (though it will vary from site to site, of course).


A sad Firefox, in real life (a red panda)

Personally, I stopped using ABP long ago because free websites rely on advertising revenue — and I don’t want those free websites to go under. If you’re more worried about advertisers tracking you across the web, disabling third-party tracking cookies or using an add-on like NoScript is a much more effective (and efficient) route than using ABP. For annoying Flash ads, click-to-play add-ons like Flashblock (Firefox/Chrome) are a better option than ABP.

The other option, if you really want to block ads (especially those pesky pre-roll video ads on YouTube and the like), is to use some kind of ad-blocking proxy server. Privoxy is free, and if you run it locally there should be a minimal performance hit. As with all proxy servers, though, the one caveat is that it doesn’t work with HTTPS connections (which is a problem, because you really should be using HTTPS connections wherever possible, if you want to escape the ever-watchful eye of cyber crooks and the government).
Source
 

Littlebits

Retired Staff
May 3, 2011
3,893
Unless you are still using an ancient system, memory usage should not matter.
No performance issues on my main desktop or my laptop.

Enjoy!! :D
 
  • Like
Reactions: Kent

XhenEd

Level 28
Verified
Honorary Member
Top Poster
Content Creator
Well-known
Mar 1, 2014
1,708
I have a low-end laptop, so I don't use Adblock Plus.
 
  • Like
Reactions: Kent

WinXPert

Level 25
Verified
Honorary Member
Top Poster
Malware Hunter
Well-known
Jan 9, 2013
1,457
I never use Adblock only Flash Block on FF
 

MrXidus

Super Moderator (Leave of absence)
Apr 17, 2011
2,503
In an extreme example, the VIM Color Scheme Test website — which has hundreds of iframes — goes from a few hundred megabytes of memory to almost two gigabytes. Nethercote only tested ABP’s memory consumption in Firefox

In regards to above I've gone ahead and tested this myself.

Cyberfox 64-bit [Intel] on Windows 8.1 64-bit with 16GB of RAM.

w5AAn5r.png

1] Memory usage for this MalwareTips thread no other tabs or webpages open.

RNgoPVK.png

2] VIM Color Scheme Test website with AdBlock Plus ENABLED.


3]
VIM Color Scheme Test website with AdBlock Plus DISABLED.

919q1Q1.png

4] VIM Color Scheme Test website with AdGuard For Firefox ENABLED.
but after some non-scientific testing it definitely feels like websites render more slowly with ABP installed.

It comes down to hardware grade and internet speed.
I don't notice a difference either way, pages load fast, of course for someone else it could be different.

I'll continue to use AdBlock Plus AdGuard & Ghostery on all websites and whitelist only those I feel worthy. Thanks.
 
Last edited:

MrXidus

Super Moderator (Leave of absence)
Apr 17, 2011
2,503
How Ghostery is different from Disconnect.me ?

You may take a look at this website: http://www.areweprivateyet.com/

Overall it seems though that Ghostery simply has bigger block lists.

These are also good to look at if you're considering Ghostery:

https://purplebox.ghostery.com/post/1016023438

https://purplebox.ghostery.com/post/1016020665

I've tried quite a big handful of various blockers but in the end I chose to stick with Ghostery.

The icon in the toolbar also makes it easier to white list or turn off/on a single tracker on demand.
 
  • Like
Reactions: Purshu_Pro and Kent
Status
Not open for further replies.

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top