
Ad Blocking Extensions Tested for Performance - rayshan
https://www.raymond.cc/blog/10-ad-blocking-extensions-tested-for-best-performance/view-all/
======
emn13
The methodology is questionable on several fronts:

\- you can't use the load event to compare advert-heavy vs. advert-free load
times. The load event does _not_ fire when the page is usable by the viewer,
it fires when every last request is done, in particular even requests fired
from various advert iframes. However, those requests may not impact page
usability. The load event may even never fire - any offscreen 1px spacer gif
that times out will cause that! I don't think there is a built-in event for
"done-enough", but the load event is certainly misleading.

\- opening the developer tools causes various side-effects; those can cause
the page to load more slowly than usual. You shouldn't benchmark with
developer tools open (unless you're explicitly targeting usage with devtools
open...)

\- comparing load times across browsers as reported by the browsers themselves
_may_ be valid, but it's not obvious. You definitely want to check that
carefully.

\- Measuring "peak" CPU usage is almost meaningless without considering how
long the CPU is used.

\- Measuring the chrome extension process CPU usage and memory usage isn't
very helpful, because running this kind of extension causes CPU usage and
memory usage in every content tab. Both of these statistics for chrome in this
use-case are meaningless. You'd need to measure the memory usage and CPU-time
of the entire chrome process tree to get meaningful results. Even in Firefox
without e10s it's not valid to measure just the main process CPU and memory
usage because plugins are in separate processes (and things like flash or h264
decoding can definitely use CPU and memory).

The only thing this page really makes a decent case for is that Chrome loads
pages faster than Firefox - but even there, it's not clear we're dealing with
an apples-to-apples comparison.

~~~
eXpl0it3r
> you can't use the load event to compare advert-heavy vs. advert-free load
> times

I don't see why not. It's exactly what they want to show, how much quicker
pages can load if you don't have to load the ads. And I personally am not
satisfied with a page that has loaded to the extend of usability. Either a
site loads fast or it doesn't.

> opening the developer tools causes various side-effects

As long as it's done for all the tests it should not matter. Whatever "side-
effects" are introduced will be applied for all tests. Of course this means
that the values themselves can't be used to compare the result against other
tests, but the goal here was anyways to compare between the different ad
blocks and not to generate values for general statistics.

~~~
chrismorgan
Some pages will be becoming usable before the DOMContentLoaded event is fired.
Some will become usable shortly after DOMContentLoaded is fired. Some will
become usable when load is fired. Some will become usable several seconds
after that. Some will never become usable. (Cynical aside: the ones with
excessive ads might fit in that classification.) There is no event that
measures _readiness_ of a page, nor can there be; there can only be a
collection of reasonable heuristics.

~~~
logfromblammo
This is where a human with a stopwatch may come in handy. The clock will start
when the page request is sent. Stop the clock when, in your opinion, you think
the page is ready to read. Alternately, if you feel the page is loading too
slowly, and have reached the limit of your patience, press this button
instead.

The event does not have to come from within the vanilla browser, without human
intervention. It could be from a plugin you create to collect human feedback
on load times.

Of course, the human element will significantly decrease the number of trials
you can do within a fixed time period.

~~~
chimeracoder
> Stop the clock when, in your opinion, you think the page is ready to read.

Even that is not enough. A number of sites ( _especially_ ad-heavy sites on
mobile devices) look ready to read, but as soon as you try to scroll, are
jerky and semi-unresponsive. It's particularly a problem on ad-laden sites of
small news publications. Blocking ads sometimes mitigates this, though not
always, as some sites insist on using Javascript to implement "fancy"
scrolling which inevitably breaks.

(Semi-related sidenote: please, for the love of God, _don 't_ use Javascript
to hijack browser scrolling. It's almost certain you will not get it perfectly
right and some users will suffer. It's almost never worth it. This is the #1
reason I end up having to switch to Reader Mode in Firefox).

~~~
logfromblammo
The maybe you stop the clock when the user navigates away from the page. If it
takes 30s to read the content without ad-loading and 40s to read it with ad-
loading, then by subjective user time, the page is 10s slower. That may be
because the ads take 10s to load, or because the distraction causes the user
to read at 75% normal speed, but it's still a measurable result from a single
variable change.

~~~
PhasmaFelis
You're going to get a whole lot of noise in your signal from readers who get
sick of waiting for/looking at the ads and leave early.

------
rockdoe
They didn't seem to know about e10s in Firefox Nightly which would have solved
their "no separate process" thing.

Measuring peak CPU is very, very stupid. The best Ad Blocker should have near
100% CPU but for an extremely short amount of time. Using 100% CPU is making
the most efficient use of the hardware, not being inefficient. Now, I think
due to the way they're measuring, it's actually closer to being average CPU
because task manager samples over a period.

Also: "Firefox didn’t like this page at all and we couldn’t get consistent
readings to run tests, on every refresh the browser would simply not respond
or crash."

Huh? I think somethings wrong there. Firefox obviously renders tmz.com. A bug
in the thing they used to monitor page load times? Did they check the
performance impact of it?

~~~
dingaling
> Using 100% CPU is making the most efficient use of the hardware, not being
> inefficient

Not necessarily with modern processors. A power-managedCPU at 50% clock-speed
actually uses less than half of the power as at 100%.

The relationship of speed to power is not linear, so for a laptop user the
most efficient use of hardware might actually be running one job for twice as
long at half-speed.

~~~
eXpl0it3r
Also if it's really using 100% of the CPU (not just one core), then it will
affect the overall PC experience since it uses up all available resources and
doesn't leave anything for other processes.

I personally dislike it when an application makes my "PC" lag every now and
then. CPU time and RAM are shared resources, thus applications should make
sure to not act selfish unless asked for (e.g. encoding a video, etc).

~~~
zymhan
It's not up to a random application to make sure you have other resources
available, that's your OS's job.

------
aidos
So it looks like about 1/4 of the time spent loading a page these days is
spent on the page and the remaining 3/4 are waiting for ad networks. There's
got to be an opportunity there.

I previously worked at a digital agency and one of my final projects was
building the website for a large TV channel. At one point I had to have a
meeting with the ad network to go through the integration.

The technical people involved didn't know anything about how their products
worked or the implications of integrating them. No idea if they were blocking
or async.

At one point I was trying to understand what, if any, changes I might need to
make to handle their ads that did full background take overs. "No no no, it's
an _expanding mpu_ " \- sure, fine, what does that even mean!?

(Don't get me started on having to swap using js for switching images in the
gallery for using individual pages because the onmiture page tracking numbers
were the metric that everything was measured by for selling ad space)

/rant

You'd think with all the smart people that have put their minds to ads on the
internet, there would be lightning fast, targeted ads that actually worked by
now.

~~~
manigandham
I've worked on lots of ad networks and am now building my own. The sad fact is
that most ad companies are not built by top engineers. It's an industry that
has lots of shady international players with lots of fraud and politics. Even
when there is good code, it's all usually focused on the backend with no
thought about the end user experience. Add to that both buyers and salespeople
who are clueless about technical details and this is what happens.

~~~
Fiahil
> The sad fact is that most ad companies are not built by top engineers.

This is an interesting thought. Working in a environment close to
advertisement (travel recommendation engine), I have a few possible
explanations on that.

\- First, working in with a product that have no (or close to) added value for
end users can be very bothering, and top engineers care about doing useful
things.

\- Second, to design a fast, simple and honest ad network you must fight your
own business/marketing team (because they always want more data, higher _click
through rate_ , etc). Since they have most of the power here, they end up
hiring more diligent engineers who won't argue about privacy, curated content
and other stuff.

\- Third, top engineers are working in ad companies, and secretly conspire to
make the whole system collapse from the inside.

~~~
manigandham
Ad companies are not typically considered "sexy". This is just an image
problem because few industries drop you into such massive scale and
engineering challenges from day 1. There is a lot of cool stuff to build.

It's not necessary to get computer science geniuses for this, and frankly I
need people who get stuff done rather than trying to save the world through
code. But the talent has been subpar because most of the companies outside of
the top few (google, facebook, twitter) are smaller and not tech driven. They
just pick up whoever can code up some simple server and get an ad on the page.
Add in all the shady companies and it gets worse. Optimizing for the user just
hasn't been a requirement.

We have a honest and fast ad network, probably the best you'll find. Quick,
simple, static ads that are non-intrusive. And we actually perform quite well.
It's not somehow at odds with the model, it's just harder... the question is,
who's willing to work harder at this?

------
Fiahil
Sure it's a nice test, and gives a keen idea of how much performance you can
grab by using uBlock Origin.

However, what about pages _without_ ads? Am I going to experience a
significant performance hit when running an adblocker on genuine websites?
This is important. Because, assuming the advertising industry is going to
self-destruct tomorrow morning, am I going to experience a slower web if I let
my add-on activated, and thus letting an opportunity for the ads to reappear
later?

~~~
bhouston
uBlock Origin seems pretty comparable to most of the other adblockers with the
exception of the pretty horrible AdBlock Plus.

------
mnw21cam
Would be interesting to have tested using a hosts file (like from
[http://someonewhocares.org/hosts/](http://someonewhocares.org/hosts/) )
instead of an ad blocker. Seems to work very well for me, and it doesn't cause
the browser to use loads of RAM.

~~~
huuu
I'm not sure: isn't it faster to just refuse the request than directing it to
localhost and waiting for a time out?

~~~
jlgaddis
As long as you don't have a firewall blocking traffic to/from localhost, the
TCP connection will be reset almost immediately (assuming you don't have an
httpd running on port 80) so you won't have to wait for a timeout.

------
malchow
In reality, people want a page that becomes _usable_ as quickly as possible.
Specifically, people use hovers and scrolling to test that a given page is
'ready.'

That is very different from a page that fires DOMContentLoaded as quickly as
possible. That metric is pretty much irrelevant to real people.

Which is part of why ads aren't quite as nasty as a lot of tech industry
people make out.

~~~
degenerate
When I start scrolling and the page seems ready to use, and then ads start
popping in late and breaking the document flow in the first few seconds - _you
better believe I 'm blocking them on your site_.

~~~
malchow
I quite agree. There's no excuse for that. Although most of the time it isn't
the fault of the website or publisher, but rather of an adtech partner.

~~~
manigandham
It's both. It's a shared execution and the publishers haven't really put the
work in either.

Check how well [http://www.theguardian.com/](http://www.theguardian.com/)
loads and you can see that it's perfect possibly to have plenty of ads while
still having a great reading experience.

~~~
malchow
Do you know what their architecture is? It is fast.

~~~
manigandham
Some details here: [http://www.theguardian.com/technology/developer-
blog/2014/de...](http://www.theguardian.com/technology/developer-
blog/2014/dec/29/what-is-the-guardians-tech-stack)

It's not really the backend that matters, these days its the front-end setup
that makes the biggest difference. Less javascript, less huge unnecessary
images, less "interactive" crap and streamlining the loading of content first
then ads async can make a site load pretty quick. They also style the ad slot
dimensions (since all banners are standard sizes) which keeps the content from
moving around when an ad does load.

Its just simple effective optimizations, something that should be done but for
some combination of bad talent, bad management and poor priorities, just isnt.

------
jmnicolas
I heard about µblock origin on HN and blindly trusted the positive comments.
Glad to see my trust was well deserved, thank you all.

------
taspeotis
I've found uBlock Origin increases memory usage heavily on
[https://vimcolorschemetest.googlecode.com/svn/html/index-c.h...](https://vimcolorschemetest.googlecode.com/svn/html/index-c.html)

~~~
asdfaoeu
To be fair that page has 430 iframes. I'd say that's fairly atypical.

~~~
the8472
Atypical? Amazon does (did?) heavily use some <iframe>/<object> trickery to
preload resources.

------
rocky1138
I would have really liked to have seen an ad-reduced hosts file compared to
these in-browser blockers.

[http://winhelp2002.mvps.org/hosts.txt](http://winhelp2002.mvps.org/hosts.txt)

------
jackgavigan
At the end of last year, I spent a while working with an adtech firm, helping
them figure out their product strategy. They all use Ghostery and I started
using it too. Subjectively, my web-browsing experience improved massively,
particularly page load times. It's nice to see that experience borne out by
objective testing.

I often think that companies like Ghostery are missing a trick by not
advertising themselves as a method of speeding up your internet connection
because that's really what it does.

~~~
XzetaU8
"Ghostery, NoScript.. add-ons frequently phone home"

[https://mailman.stanford.edu/pipermail/liberationtech/2015-A...](https://mailman.stanford.edu/pipermail/liberationtech/2015-April/015236.html)

~~~
stingraycharles
Well yeah, because Ghostery is a product of Evidon, which helps adtech
businesses to get visitors to opt-in to tracking. It's a clever strategy,
because they give valuable feedback about which ads and trackers are blocked
for which reasons. If you can't beat them, outcompete them!

(I worked as CTO of an adserving platform and had to reject sales calls from
Evidon on an almost monthly basis)

------
jakeogh
Lowest overhead: Disable JS (add it to a hotkey) and use DNS level filtering:
[https://github.com/jakeogh/dnsmasq-
blacklist](https://github.com/jakeogh/dnsmasq-blacklist)

With surf+tabbed, each tab is it's own process, so you can enable and disable
JS and or plugins per page.

------
tim333
Next we need to find the best blocker cocktail. I use uBlock Origin, Ghostery
and Flashcontrol on Chrome. Bit over the top possibly - can take a bit of
trial an error to see what's blocking the thing if something you want doesn't
load.

~~~
jdmichal
Have you tried uMatrix? If you have, I'm curious how you think it compares to
your current mix.

~~~
the8472
seconded, for people who want to sacrifice some convenience for control
µmatrix may be a better choice.

------
teaneedz
Why is uBlock somewhat frowned upon here on HN? From what I've seen published
it's still a good solution - works well for me. I thought the original
developer gave up the project and was being rather difficult about the whole
thing.

~~~
rockdoe
He came back and has been improving it actively, and wasn't too happy about
technical decisions in the fork.

------
sandworm101
Forgetting the accuracy of the OP, I cannot be the only one who doesn't care
in the least that adblockers slow load times. Between my ISP's shoddy service,
the popups and distracting animations adblockers stop, the net effect is a
faster overall experience. A few seconds on page load is a fair price to pay
for the increased privacy and security.

------
amelius
Are there any ad-blockers out there that also block Google ads (inline in
websites, and also on top of search results)?

~~~
asdfaoeu
uBlock Origin does, though I'm pretty sure all do.

------
andor
A much overlooked alternative to installing sketchy addons is to simply
disable Javascript by default.

~~~
dtech
This also breaks 95% of the web

~~~
andor
You're spreading FUD. Disabling Javascript _by default_ is one of the easiest
ways to reduce browser attack surface, improve page load times and to remove
the most annoying ads. The vast majority of pages work (to some degree)
without scripts.

If you really need scripting on a page, _it 's very uncomplicated to add an
exception in Chrome_: just click the "Javascript blocked" icon in the address
bar, and choose "Always allow Javascript on example.com".

~~~
chimeracoder
> improve page load times and to remove the most annoying ads. The vast
> majority of pages work (to some degree) without scripts.

In my experience using NoScript for the past year on all my desktops and
laptops, this is at best only partly true.

Load times do definitely decrease, but this is dwarfed by the effect of having
to reload the page for most new sites after re-enabling Javascript (since so
many sites are unusable without Javascript[0]). In the end, it's a much slower
experience browsing the web, not faster, and even with aggressive
whitelisting, it's still rather frustrating.

I actually have separate Firefox profiles that I use for various websites that
tend to be particularly problematic with extensions (like online banking), so
I'm not even including those in this summary.

I wish using NoScript provided a faster browsing experience overall while
providing better security, but the simple fact remains that right now, it does
not. It provides better security at the expense of slowing down your browsing
experience.

[0] So many static blogs now literally fail to display static text without
Javascript!

~~~
nske
Sadly, that's true. I'm wondering how many feel that this is not a good
direction where things are going -or if it's just me being "old".

Why would someone want to use javascript on the client-side for things where
it's not necessary?

Year after year, the browser and the web are turning into "something else",
and while the possibilities are exciting, it seems the use cases where
javascript is used for things that actually make a positive difference, are
vastly outnumbered by the cases where it is used to re-implement in a more
flashy, complex and resource-intensive way things that have been usable,
performant and functional, 10 years ago.

IMO displaying content should be done just by HTML, using javascript if it's
not to provide _useful_ functionality, is wrong.

Whether it is browser HTML/CSS incompatibilities, flash atrocities or complex
script bloat, it seems the popular web always manages to fix one problem and
create another.

------
scrollaway
blogspam, stop upvoting this please.

~~~
dang
Is that fair? The article looks a bit spammy, but seems to be an actual test
not copied from elsewhere.

~~~
mcintyre1994
The article's solid and substantial, it's the first I've seen to quantify the
effect of ABP's acceptable ads policy. Also they have a view all button that
works.

------
the-dude
One of my pet projects is 'wijVrij', a cheap TP-Link router with OpenWRT and a
bootup-script which installs the winhelp2002 hosts file.

Works wonders on all your devices. [https://wijvrij.nl](https://wijvrij.nl) (
dutch )

