
Firefox 41 will use less memory when running AdBlock Plus - nnethercote
https://blog.mozilla.org/nnethercote/2015/07/01/firefox-41-will-use-less-memory-when-running-adblock-plus/
======
sergiotapia
This is good but do not use Adblock Plus. Use µBlock. Adblock Plus let's
through some 'kosher' ads. If that's acceptable to you, all good. If you want
no ads whatsoever, use µBlock.

It works out of the box and blocks everything. Uses even less resources that
any other alternative.

Chrome: [https://chrome.google.com/webstore/detail/ublock-
origin/cjpa...](https://chrome.google.com/webstore/detail/ublock-
origin/cjpalhdlnbpafiamejdnhcphjbkeiagm?hl=en)

Firefox: [https://addons.mozilla.org/En-us/firefox/addon/ublock-
origin...](https://addons.mozilla.org/En-us/firefox/addon/ublock-origin/)

~~~
slacka
Yes, I like to support sites like reddit that vet their ads to eliminate the
obnoxious ones. In an ideal world, I'd like the speed/memory usage of µBlock
with the ability to enable the 'kosher' ads. When 41 goes to stable I'll re-
enable ABP.

~~~
bitJericho
All ads are obnoxious. Abp charges for the privilege of allowing ads through.

~~~
kekebo
I'm not a fan too. But I come to realize that it can be an easy way to support
sites you like without having to spend one penny, just by disabling your
adblocker. If there are companies willing to give money to websites I like by
displaying little images that I won't even look at - so be it.

~~~
bitJericho
Ads work even for if not especially for those who think they don't. I'd rather
support people by paying for their work directly instead of going through
middle ad-men.

------
blinkingled
[http://vimcolorschemetest.googlecode.com/svn/html/index-c.ht...](http://vimcolorschemetest.googlecode.com/svn/html/index-c.html)
\- the page referenced in the article that shows extreme AdBlock overhead -
Chrome just chokes on it for a long time - the tab uses 1.7GB of memory while
it is still loading!

With uBlock and FF 38 - the page load completes faster and only about 850MB
memory is used in total!

Chrome people should _really_ be doing something about the memory and battery
usage on the desktop. It's getting ridiculous.

Also I wonder how things such as OS X's Compressed Memory feature affect this
in real life. I mean without the fix, the OS will notice the duplicated, in-
memory style sheets and compress them to reduce memory usage and you should
not see much of an improvement due to this patch on platforms like OS X that
implement memory compression.

(Looking at activity monitor with FF loading the vim color scheme test shows
0MB Compressed Mem for FF - not sure if FF opts out or if there simply isn't
enough memory pressure for the OS to start compressing FF's mem.)

~~~
taspeotis
> Chrome just chokes on it for a long time - the tab uses 1.7GB of memory
> while it is still loading!

Chrome 43.0.2357.130 m (64-bit) on Windows 8.1 here, takes 787.6 MB for me
(with uBlock). If I open an Incognito window (i.e. no extensions) it takes 109
MB. Not sure where this discrepancy is coming from. Chrome's responsive the
whole time.

[http://i.imgur.com/QFG2ryq.png](http://i.imgur.com/QFG2ryq.png)

~~~
bitmapbrother
The discrepancy is courtesy of the ad blocker extension.

~~~
blinkingled
Chrome extensions run in their own process which means the memory usage is
reported separately for each tab and extension. IOW the memory usage for the
tab is that of Chrome 100%.

~~~
taspeotis
I believe (most) ad blockers work by changing the DOM of each tab. They inject
their own CSS to hide elements. The the stylesheets will be processed in the
tab's process, not the extension's. This VIM page would be quite heavy on
elements that need styling by CSS.

------
shmerl
14 years old bug fixed. Congratulations! (I'm not sarcastic - it's always good
when such bugs are fixed).

~~~
heycam
Thank you!

------
nicolas_t
I would love to have a way to accept kosher ads with ublock origin (but not
ads that have been whitelisted by paying ABP). It would be great if there was
a transparent community driven ad whitelist.

I want to support content creators but I also do not want to have to deal with
the more obnoxious ads (or flash ads or animated ads and so on). I currently
support a few creators with patreon but that's only limited to a few.

~~~
erikb
How about non-ad ways to interact with the right communities, like a
corresponding subreddit? To me that sounds more reasonable, since that way you
increase the communication and your own awareness, but don't support spamming
people with information they haven't requested.

------
bane
I'm a convert to using "the great suspender" in chrome and the amount of
memory it consumes for me has dropped dramatically. The tradeoff is waiting
for a page to reload when I focus the tab, but it let's me keep dozens of tabs
"open" at once, for long periods of time, without annihilating my system
memory.

Combined with µBlock and click to activate plugins etc. Chrome almost behaves
now.

~~~
DiabloD3
Great Suspender + Spaces (from the same guy) makes Chrome usable again.

------
brokentone
I'm always shocked at the age of some really important bugs. Large
optimization potentials of many public / well used / open source systems have
been noted for many years.

~~~
jlebar
Consider that the web has changed a lot over the past 14 years. Back when this
bug was filed, it was much less common to have many tabs open, and those tabs
would have contained many fewer documents on average. So even if ABP had
existed back then, the optimization potential would have been much smaller.

~~~
pgeorgi
Tabs were introduced to Phoenix/Firefox in September 2002, so 14 years ago
there were no tabs :-)

Multiple windows, sure, but the win98/2000/xp style of window management
wasn't conductive to having 100 open windows, either.

------
dethstar
I can finally go back to ABP!

Firefox used to crash a lot, and freeze a lot back when I was using ABP.
ublock has never worked as well for me, I also dislike the element selector.
Sometimes I want more than blocked something being displayed, like blocking a
script. And ABP allowed that easier, that's something I miss.

~~~
unexistance
yeah, uBlock Origin makes it a tiny little bit hard to undo what you've block,
I find it easier by bookmarking the below which opens the settings page &
remove the most recent lines you added / blocked

chrome://ublock0/content/dashboard.html

------
skrowl
As Chrome gets more and more bloated and slow, I think more and more people
will switch (back) to Firefox

~~~
mike-cardwell
I'd wager the majority of Chrome users are simply normal people who had it
shoved in their face when using Google web properties with Internet Explorer.
These people are not aware of Firefox.

------
BuckRogers
Anyone here prefer uBlock over UBlock Origin? I tried both and stuck with
Origin since something like this should be relatively easy to reach "feature
complete" status, thus go into pure maintenance mode. Either are a big step up
from ABP.

~~~
fwn
If you compare their repo activity, it seems to suggest that the actual
development happens at origin.

Origin:
[https://github.com/gorhill/uBlock/graphs/contributors](https://github.com/gorhill/uBlock/graphs/contributors)

Nonorigin:
[https://github.com/chrisaljoudi/uBlock/graphs/contributors](https://github.com/chrisaljoudi/uBlock/graphs/contributors)

------
aorth
First, I believe everyone should be using uBlock (Origin) [1] anyways. Second,
I'm looking forward to seeing how Firefox's built-in tracking protection will
evolve[2]. Also, should be interesting to see how Safari's new blocking
framework changes the game.

[1] [https://github.com/gorhill/uBlock](https://github.com/gorhill/uBlock)

[2] [https://support.mozilla.org/en-US/kb/tracking-protection-
fir...](https://support.mozilla.org/en-US/kb/tracking-protection-firefox)

~~~
thescrewdriver
I'm also curious to see how things evolve with the countermeasures:
[http://www.businessinsider.com/former-google-exec-
launches-s...](http://www.businessinsider.com/former-google-exec-launches-
sourcepoint-with-10-million-series-a-funding-2015-6/) (a terrible idea imho).

------
atonse
Safari's new approach of using a built in (natively compiled) rules engine to
block content seems more and more to be the best option. But it's also the
kind of option you'd only see from a vendor who doesn't make any money from
ads (Apple... and possibly MS).

~~~
EricVi
What doesn't prevent these vendors to advertise their own products. Or make
money by letting others pay. Apple, MS and {{any_big_company}} do everything
that generates revenue. Even Mozilla has started to sell data and advertising
space in Firefox. I don't care where the spam is coming from. And no Mozilla,
I will certainly never book my next holiday trip on booking.com.

~~~
Manishearth
Advertising space, not data. Nobody is tracking you through the new tab page.
Mozilla just populates it with some default ads (which can be removed or
replaced with your own new tab customizations)

~~~
BenjiBajing
Actually Mozilla analyzes and stores the user's surfing data to allow it's
customers to direct ads to the user's preferences. I actually don't understand
why so few seem to bother. I think it's a quite big deal. Same with these
telefonica chat thing.

~~~
Manishearth
Source?

[https://support.mozilla.org/en-US/kb/how-do-tiles-work-
firef...](https://support.mozilla.org/en-US/kb/how-do-tiles-work-
firefox#w_what-data-is-being-collected-and-why)

[https://www.mozilla.org/en-US/firefox/tiles/](https://www.mozilla.org/en-
US/firefox/tiles/)

Regular telemetry data. Not surfing data. And certainly not sold.

Hello doesn't collect data passively either; using the video chat can of
course lead to data collection though I doubt it does (but you would have to
assume that can happen for any non peer-to-peer service of this kind since
there will always be a server side component which you can't verify)

Stop spreading FUD.

------
antgiant
Is there a Chrome or Firefox equivalent to IE's "Personalized Tracking
Protection List"? In short it tracks the resources loaded by sites you visit
and if they show up on more than a configurable number of sites they get
blocked. Basically, it only blocks what actually could be tracking you. I
would love to have that functionality in Chrome or Firefox, especially if the
tracking list could survive a reinstall (IE's cannot).

~~~
kasabali
AFAIK EFF's Privacy Badger uses a similar mechanism to what you described.

~~~
antgiant
Perfect! Thank you!

------
erikb
It's not clear to me from reading the article, if the headline is correct.
From what I understand (non-native speaker) with the mentioned fix ABP uses
less memory than last year without that fix. But does it make FF use less RAM
in general, compared with FF with fix but without ABP? That's how I understand
the headline, ABP makes you save RAM compared to using FF without ABP. But
that's not how I understand the article.

~~~
nnethercote
Mmm, I see the ambiguity. It's meant to mean that "the combination of Firefox
+ AdBlock Plus will use less memory than it did previously", _not_ "Firefox +
AdBlock Plus will use less memory than Firefox alone".

The fix will also reduce the memory usage of Firefox when used without AdBlock
Plus, but the difference will be small.

------
a3n
Fastmail web interface users + ABP|ABE|uBlock users:

When I have any of these three blockers installed, and then use mail
composition on the Fastmail tab, the page jumps around while I type.
Eventually the line that I'm typing has scrolled itself down to the bottom of
the window, and sometimes even jumps between below the window and just enough
above the bottom.

Anyone seen that?

~~~
kijin
Fastmail user here. Firefox + ABE + EFF Privacy Badger, no problem.

Fastmail's web interface doesn't even have any blockable items once you log
in.

~~~
a3n
Hrmph.

I'm only as far as noticing, uninstalling whichever, going "huh," reinstalling
and going "feh."

~~~
kijin
Do you still have issues if you disable AdBlock on fastmail.com? There
shouldn't be any ads on that domain anyway.

~~~
a3n
Hmm, now I can't reliably reproduce, so I don't know if disabling on fm has
any effect. I'll have to wait for it to happen again.

------
kylek
>> Firefox 41 Developer Edition is scheduled to be released in the next day or
two.

------
RRRA
What about µBlock?

~~~
heycam
µBlock does not use the same technique of creating a style sheet and inserting
it into all loaded documents, so the type of sharing done as part of this work
does not help µBlock.

~~~
jzelinskie
I'm pretty sure it does according to this wikipage[0]. It may not load _all_
the rules into every page, but it definitely does create a stylesheet and
inject it into the page.

[0]: [https://github.com/gorhill/uBlock/wiki/Cosmetic-filtering-
in...](https://github.com/gorhill/uBlock/wiki/Cosmetic-filtering-
in-%C2%B5Block:-version-0.4.0.0-update)

~~~
heycam
I can't see where on that page it talks about using style sheets. Last week I
searched the µBlock sources for use of the nsIStyleSheetService, which is
Gecko's internal interface for adding style sheets without manipulating
individual documents, and the only use of that interface is for adding
css/legacy-toolbar-button.css, which I assume is for some UI.

~~~
jzelinskie
So, this might be a case of me assuming too much, but I basically read every
instance of _cosmetic filters_ basically as _css styles_. There are a couple
CSS files in the git repository that have "filter" in their names[0], but yeah
I can't actually be 100% certain at a glance that they're using CSS and not
manipulating the DOM with JS.

[0]:
[https://github.com/gorhill/uBlock/tree/master/src/css](https://github.com/gorhill/uBlock/tree/master/src/css)

~~~
heycam
I just did some poking around, and it looks like uBlock does insert a couple
of <style> elements into the document. I'm not sure if this is how all style-
based blocking is done in uBlock, but since these are document-level style
sheets, they are not shared like user agent-level sheets are. (We will in the
future be investigating whether we can share more data between common
document-level style sheets across multiple documents, though.)

------
driverdan
It's good that this is fixed but why is it taking 14 years to fix bugs?

------
JustSomeNobody
Has anyone compared memory usage when using a hosts file to block ads?

------
tiatia
1\. Why not start with 1 or 2 decent host files?
[http://winhelp2002.mvps.org/hosts.htm](http://winhelp2002.mvps.org/hosts.htm)

2\. What is bad about ghostery?

~~~
anc84
1\. Hosts blocking is very broad. Good tracking-/ad-blocking is granular.

2\.
[https://en.wikipedia.org/wiki/Ghostery#Criticism](https://en.wikipedia.org/wiki/Ghostery#Criticism)

------
vgeek
How much did ABP pay Mozilla?

~~~
nindalf
Conspiracy theorist much? Mozilla knows that a significant portion of their
userbase uses ad blockers and complains about the high resource usage. They
added a cool feature today that would reduce that usage, resulting in a better
experience for their users. But you feel someone needed to pay them?

