Live data from Hacker News

AdBlock Plus’s effect on Firefox’s memory usage

blog.mozilla.org

81–90 of 270 posts

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

#81
post #29

So is there any insight as to why? My guess, without looking at the code would be the regex engine allocating millions of NFA graphs.

Nope. https://bugzilla.mozilla.org/show_bug.cgi?id=988266#c20 has a detailed breakdown of the style-sets memory usage.

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

#82
post #71

Earlier quoted context omitted.

Have you been able to block stuff like Tynt, and other copy/paste triggered JS stuff?

I was not aware of Tynt, but I believe it's well blocked. I just looked at the adblock-hosts file, and 'tynt' appears several times. One of those lines is commented with a link to an article about tynt[0]. I tried copy-pasting from The New Yorker and TechCrunch (who, as claimed by the author of the article, use tynt), and both times there was no crap appended. 0: http://daringfireball.net/2010/05/tynt_copy_paste_jerk…

Thanks, I may try this out and see if I can move over my few custom blocked sites that implement this stuff.

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

#84

Earlier quoted context omitted.

> They make is as hard as humanly possible to use bookmarks Chrome has a "star" button right in the address bar, FF and IE have Ctrl+B to create a bookmark. And both Chrome and FF have a pretty good auto-complete in the address bar (I just have to type "ne" to get Hacker News, "ma" for google mail, "youp" and "yout" for video streams, etc pp). People vastly underestimate the power of keyboard shortcuts. I work as a f…

> Chrome has a "star" button right in the address bar, FF and IE have Ctrl+B to create a bookmark. The Classic Theme Restorer add-on for FF allows you restore the star button to the address bar. On FF, Ctrl-D bookmarks the current page, while Ctrl-B opens a list of bookmarks.

I don't get it; I'm on FF 29 without that addon, and I have a star button on the bar (not in the address text input, but on the same bar). What's the point of the addon?

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

#85
post #76
post #9

http://someonewhocares.org/hosts/zero/

Host files are very limited, and when you start dealing with anti-adblock scripts and other css/js scripts on some sites it falls apart. Basically hosts file was great 10+ years ago when the Web was new(ish) and Adblock was only used by a few. Now we're dealing with CSS, objects, subrequests, first party ad/tracking scripts. With all the features Adblock Plus gives us, far far more than just blocking xx and yy domain…

ABP is filtering content that's already been retrieved over the network and read into the browser. With hosts, the blocked content never makes it into my machine, which saves bandwidth.

I think using both is better than either one alone. A hosts file to quickly remove most of the unwanted stuff, and ABP to finish off the rest that does get through.

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

#86
post #43
post #9

http://someonewhocares.org/hosts/zero/

I switched from ABP to this hosts file a few months ago and I have zero regret. My browser's faster, lighter and ads are blocked just as well as with ABP. I actually even started splitting my hosts file: the layout is /etc/hosts ('compiled' version) /etc/hosts.d/ /etc/hosts.d/aaa-warning (warning reminding me to run `update-hosts` instead of modifying /etc/hosts. Appears atop the compiled file) /etc/hosts.d/adblock (…

Most of my adblock stuff is CSS based. I use element hiding helper to figure out which bits to kill. I have hundreds of these custom rules.

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

#87
post #27
post #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…

As far as I can tell, HTTPSB is not available for Firefox, please fix! I would love to use something better than ABP (in terms of performance, it does content filtering just fine), but I'm not so desperate to abandon the (warning: subjective content ahead) greatest browser of all times to lower the memory footprint of an ad blocker.

I'm betting this is not an easy task.

It however would be really awesome for HTTPSB (which I just installed on chromium and fallen in love instantly with) to be ported to firefox.

Seeing all the privacy-related features treated, by domain/site/everywhere rules, being able to block separately js/plugins/cookies (and by the way, the matrix is a great idea, a lot more useable than anything else out there)... in one extension only. Great work already, gorhill!

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

#88
post #43
post #9

http://someonewhocares.org/hosts/zero/

I switched from ABP to this hosts file a few months ago and I have zero regret. My browser's faster, lighter and ads are blocked just as well as with ABP. I actually even started splitting my hosts file: the layout is /etc/hosts ('compiled' version) /etc/hosts.d/ /etc/hosts.d/aaa-warning (warning reminding me to run `update-hosts` instead of modifying /etc/hosts. Appears atop the compiled file) /etc/hosts.d/adblock (…

If you want to pull hosts files from multiple sources, you may want to consider sort'ing and uniq'ing to remove duplicates.

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

#89
post #3

The first thing people complain about with browsers is probably memory usage. I doubt that many people actually understand what a browser actually does with that memory. I sure don't. 100mb sounds like a lot of memory for a webpage. Where does all this memory go to?

Many people think of a browser as a tool for displaying text and pictures, with maybe a bit of JS code and some CSS effects on the side. That was true in the late 90s, but these days a browser is actually a fully-fledged programming environment that also happens to have some incredibly sophisticated multimedia capabilities: text, images, video, audio, animations, 3d graphics, etc. The most popular websites run quite…

> That was true in the late 90s, but these days a browser is actually a fully-fledged programming environment that also happens to have some incredibly sophisticated multimedia capabilities: text, images, video, audio, animations, 3d graphics, etc.

Maybe I just miss the 90s, but I would much rather have the simple content browser than a "full-fledged programming environment", especially since all of that content is coming from the random untrusted intarwebs. Anyone want to write a browser engine that skips all the modern BS and just does a good job delivering mostly-static webpages?

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

#90
post #64
post #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…

Does HTTPSB have a keyboard interface? I just installed it and it seems great, but I'd prefer to not use the mouse. E.g. NoScript has Ctrl+Shift+\ to temporarily whitelist the current page's domain and Ctrl+Shift+S to open the drop-down, and the drop-down works well with the arrow keys.

It doesn't yet. I should enter an issue for this.

Someone else at some point asked for a pull request for keyboard shortcuts (and other stuff), but at the time I thought that the extension wasn't stable enough feature-wise, and I didn't want to deal with anything which would need constant revision before the feature set stabilize. For instance, I eventually trashed the context menu code that was put in too early because of this.

But now that it definitely is approaching v1.0, it probably does make sense to address that issue.

Post reply on HN