Live data from Hacker News

AdBlock Plus’s effect on Firefox’s memory usage

blog.mozilla.org

11–20 of 270 posts

Re: AdBlock Plus’s effect on Firefox’s memory usage

#11
My primary computer is a laptop from 2008 with a 2.5Ghz Core 2 Duo and other than a 1 second delay in startup I don't notice any performance degradation in general use compared to running without ABP.

Currently this machine has been up for 3 days and 17 hours and Firefox has been running the whole time and it is using 303MB with 4 tabs open one of which is the Daily Mail (don't judge!) which is an extremely busy page. This is perfectly acceptable in my opinion. I only have 4GB RAM which by todays standards in not much either. Obviously reducing the memory footprint is great but I can't say it has ever been a problem I have ever noticed.

On a side note the past few updates to Firefox have improved performance a lot. I am really impressed by how much quicker the browser is, especially with Chrome seeming to just get slower and slower with each update.

Re: AdBlock Plus’s effect on Firefox’s memory usage

#13
Very interesting.

There might be an architecture problem here. Another solution is to use a proxy to block ads, like GlimmerBlocker for OSX. But I didn't investigate memory usage, though I tend to think it will be lower (plus have the added benefit of working simultaneously for all browsers).

Re: AdBlock Plus’s effect on Firefox’s memory usage

#14
post #4

I'm surprised AdBlock is so popular. I tried it a few years ago and noticed the sluggishness immediately. I know it's not a feasible alternative in everyone's opinion, but if you're running a low end machine and want to block the most pernicious ads (flash, multiple external javascript, etc.) then Firefox + NoScript is the way to go.

Presumably if you have a slower internet connection the performance cost of injecting stylesheets is offset by the reduction in how many images/flash banners/etc. you have to download.

Re: AdBlock Plus’s effect on Firefox’s memory usage

#15
post #4

I'm surprised AdBlock is so popular. I tried it a few years ago and noticed the sluggishness immediately. I know it's not a feasible alternative in everyone's opinion, but if you're running a low end machine and want to block the most pernicious ads (flash, multiple external javascript, etc.) then Firefox + NoScript is the way to go.

I used to run a 700MHZ powerbook, and the fan used to whir away. One day I realised that having Firebug running wasn't helping! But I foolishly hadn't even considered it, as I was so used to running the extension. Adblock Plus I pretty much always install too, so would just think it was normal. It still feels much better than running the adverts!

I did try noscript for a while, but I got fed up having to turn it on for sites that just failed to work without JS, and got bored moaning about it.

Re: AdBlock Plus’s effect on Firefox’s memory usage

#16
post #4

I'm surprised AdBlock is so popular. I tried it a few years ago and noticed the sluggishness immediately. I know it's not a feasible alternative in everyone's opinion, but if you're running a low end machine and want to block the most pernicious ads (flash, multiple external javascript, etc.) then Firefox + NoScript is the way to go.

Many of the sites with the most pernicious ads require JS to function, so NoScript isn't really that effective if you're going to, say, stream the latest episode of Game of Thrones.

Re: AdBlock Plus’s effect on Firefox’s memory usage

#18
post #5

Anyone knows if this also affects Chrome? I have Chrome saying Adblock is using 126MB of memory, but if there are giant stylesheets injected elsewhere that might no be reported fully in the Chrome task manager.

As a chromebook user (with 2gb of ram) Adblock plus is routinely the chief culprit for slow downs. I've found it using 400mb of ram with sites like youtube and facebook open.

Re: AdBlock Plus’s effect on Firefox’s memory usage

#19
Wouldn't the solution involve allowing plugins to manipulate the content of a page before it is parsed by the browser?

There used to be a proxy adblocker that did that, but I don't think it works anymore.

The Kindle browser uses a proxy to pre-render pages on the server in order to lighten the load of the device.

Could AaaS (Adblock as a service) be a viable business? I think I'd pay for it.

Re: AdBlock Plus’s effect on Firefox’s memory usage

#20
It's not just memory overhead, it is also CPU overhead.

One approach is to write the filtering engine from scratch. It is what I did, without looking at ABP's code beforehand in order to ensure a clean slate mind.

I didn't get it right the first time, I did spend quite a large amount of time benchmarking, measuring, prototyping, etc.

Once I was satisfied I had finally had a solid code base, I went and benchmarked it against ABP to find out how it compared:

https://github.com/gorhill/httpswitchboard/wiki/Net-request-...

And for HTTPSB's numbers, keep in mind there were an extra over 50,000 rules in the matrix filtering engine (something not found in ABP).

So I think this shows clearly ABP's code can be improved.

Post reply on HN