Earlier quoted context omitted.
Just installed the extension and it seems great. Particularly like the matrix UI for allowing/blocking things. However, I definitely don't want to micromanage things like accepting scripts and cookies for certain sites I use. Is there a way to make it work essentially the same way as AdBlock does? Tried to look in the wiki but didn't find anything.
This! I would like to have AdBlockPlus' UI with httpSwitchboard's backend. So I filed a request to AdBlockPlus to do that: https://issues.adblockplus.org/ticket/488
AdBlock Plus’s effect on Firefox’s memory usage
261–270 of 270 posts
Re: AdBlock Plus’s effect on Firefox’s memory usage
#262Re: AdBlock Plus’s effect on Firefox’s memory usage
#263Earlier quoted context omitted.
I'd tried this in the past but my machine slowed to a crawl. I guess it was to do with the algorithm used for handling the list of hosts (this sounds like a job for a bloom filter). I've just tried the list you provided and it seems to be ok. Will try it for a while to see how I get on.
A quick dive brought me to glibc: seems like everything is done in `resolv/gethnamaddr.c`. Look for `_PATH_HOSTS` mentions: it is defined as "/etc/hosts/". The parsing seems done by the function `gethtent`. However it returns a single `hostent`... I'll try to understand it tonight.
Since gethnamaddr.c appears to be BSD-licensed I'm willing to bet that 99% of all OSs out there (including Windows) are going to have similar if not identical code.
Re: AdBlock Plus’s effect on Firefox’s memory usage
#264Earlier quoted context omitted.
A quick dive brought me to glibc: seems like everything is done in `resolv/gethnamaddr.c`. Look for `_PATH_HOSTS` mentions: it is defined as "/etc/hosts/". The parsing seems done by the function `gethtent`. However it returns a single `hostent`... I'll try to understand it tonight.
It's a brute-force linear search. _gethtent() returns one line from the hosts file at a time, the loop itself is in _gethtbyname2(). It opens and parses the hosts file every single time . If I were asked to improve this, I'd probably open and parse the file only once, reparsing when the file's been updated, maybe use an on-disk cache file. Second change would be to use a hash table. I don't think anything as sophisti…
There's a few packages that take a serious approach at adblock-through-hosts-file, including hostsblock[0], linked below. The cost of the systematic linear search is mitigated by the use of a DNS caching daemon, such as dnsmasq or pdnsd.
Indeed a Bloom filter would be overkill, and I'd rather avoid false positives!
Re: AdBlock Plus’s effect on Firefox’s memory usage
#265Earlier quoted context omitted.
If the computer is that old, then the user is an outlier and not the target audience for the modern major browsers. Better off finding a niche browser.
Actually my computer is only four years old, and supports up to 2GB of RAM. It is hard to find a working niche browser when Mozilla and Google are doing everything to make sure the web depends on their behemoths' complexity. They are pushing for the Web Platform. They are constantly adding new features. I used to use Links 2 as my primary browser until about a year or two ago. I would have preferred to keep using it…
Re: AdBlock Plus’s effect on Firefox’s memory usage
#266It'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…
Re: AdBlock Plus’s effect on Firefox’s memory usage
#267Earlier quoted context omitted.
I did enter an issue 6 months ago to make it color-blind friendly: https://github.com/gorhill/httpswitchboard/issues/52 I know nothing about color-blindness though, so I will need the input of color-blind people. If there is an option to use blue instead of green, would that work?
That would work for some. The best path would be to not solely rely on color for information representation. Add some other visual element, such as a pattern to the color, or a small icon. I'll chime in on the issue.
Re: AdBlock Plus’s effect on Firefox’s memory usage
#268Earlier quoted context omitted.
Just installed the extension and it seems great. Particularly like the matrix UI for allowing/blocking things. However, I definitely don't want to micromanage things like accepting scripts and cookies for certain sites I use. Is there a way to make it work essentially the same way as AdBlock does? Tried to look in the wiki but didn't find anything.
This! I would like to have AdBlockPlus' UI with httpSwitchboard's backend. So I filed a request to AdBlockPlus to do that: https://issues.adblockplus.org/ticket/488
This is where I was at an advantage, I was writing new code to fit with new code. There are ideas though that were keys to performance breakthrough which they certainly could borrow.
Re: AdBlock Plus’s effect on Firefox’s memory usage
#269Earlier quoted context omitted.
Actually my computer is only four years old, and supports up to 2GB of RAM. It is hard to find a working niche browser when Mozilla and Google are doing everything to make sure the web depends on their behemoths' complexity. They are pushing for the Web Platform. They are constantly adding new features. I used to use Links 2 as my primary browser until about a year or two ago. I would have preferred to keep using it…
What irks me the most about this whole "web must move forward" mentality is that machines that would otherwise be perfectly usable for the sorts of basic tasks one used to be able to do even without these new web technologies (i.e. read email, news, etc.) are being obsoleted and scrapped by people buying newer, much faster hardware --- only to be used just for those same basic tasks again.
Basic web browsing/word processing is incredibly cheap to do right now in a new PC (sub $200 sans peripherals for the absolute newest hardware). In my opinion, these are machines that will handle web tasks for at least the next 10 years barring some huge shift that I cannot foresee.
Re: AdBlock Plus’s effect on Firefox’s memory usage
#270Earlier quoted context omitted.
A proxy cannot dynamically interact with the DOM, so it cannot do everything a plugin can. I think the solution is to use better datastructures in the plugin and improve the integratation of the plugin with the browser.
Cloudflare can, somehow...