Re:Firefox 41 will use less memory when running AdBlock Plus
by heycam on Tuesday June 30, 2015 @09:17PM
(#9809462)
µ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.
[ Parent
| on HN ]
Re:Firefox 41 will use less memory when running AdBlock Plus
by jzelinskie on Tuesday June 30, 2015 @09:28PM
(#9809501)
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...
Re:Firefox 41 will use less memory when running AdBlock Plus
by heycam on Tuesday June 30, 2015 @09:34PM
(#9809522)
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.
Re:Firefox 41 will use less memory when running AdBlock Plus
by jzelinskie on Tuesday June 30, 2015 @09:45PM
(#9809572)
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.
Re:Firefox 41 will use less memory when running AdBlock Plus
by heycam on Tuesday June 30, 2015 @10:27PM
(#9809740)
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.)