Edit, Copy, and Export buttons
Edit, Copy, and Export buttons
Where's the Edit, Copy, and Export buttons mentioned in the 3rd paragraph at en/redundancy_check?
I'm on Windows 7 Ultimate x64, Firefox 11.0. Thanks a million for your kind help.
I'm on Windows 7 Ultimate x64, Firefox 11.0. Thanks a million for your kind help.
Re: Edit, Copy, and Export buttons
There is no "Export" button, and Copy would be found in the browser's Edit menu (under the Firefox button in the top-left, or in the menu bar if you decided to stay with that).
Anyway, exporting of custom filters is done within the ABP interface, as described here: forum/viewtopic.php?p=54436#p54436
Anyway, exporting of custom filters is done within the ABP interface, as described here: forum/viewtopic.php?p=54436#p54436
Anyway, the redundancy-checker on adblockplus.org is outdated, not understanding the latest filter-syntax, so you should use this one instead: https://arestwo.org/famlam/redundantRuleChecker.htmlvinny86 wrote:right click on the red ABP icon
filter preferences.
custom filters (tab)
at the bottom left "backup and restore"
create new backup
change save as type to "custom filters only"
save/export
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Re: Edit, Copy, and Export buttons
Thanks a million. I don't have any custom filters yet. I want to check if there are any redundancies in my Filter subscriptions (Fanboy's List, Fanboy's Tracking/Stats Blocking, and fanboy-annoyances). How can I do that? PLEASE, give clear, step-by-step instructions.
Re: Edit, Copy, and Export buttons
Honestly, just count on Fanboy and nitrox to do that; anyway, I just did it again and here are my results...
Fanboy Adblock
In general, go to "View List" or somehow else obtain the plain text-file that the subscription is based on, then copy the contents and paste into that redundancy-checker I linked to earlier; click "Check for redundant rules" and wait awhile, and then you can see which rules were regarded as redundant and there will be a link to see the cleaned list.
Fanboy Adblock
Fanboy TrackingFanboy Adblock wrote:||wigetmedia.com^$third-party has been made redundant by ||wigetmedia.com^$third-party
###adver6 has been made redundant by ###adver6
complaintsboard.com##.goog-border has been made redundant by complaintsboard.com##.goog-border
wptv.com##.ad has been made redundant by wptv.com##.ad
##.adspot.mrec has been made redundant by ##.adspot
mediafire.com##.lb-ad has been made redundant by ##.lb-ad
mediafire.com##.ws-ad has been made redundant by ##.ws-ad
imediaconnection.com##.banner728x90 has been made redundant by ##.banner728x90
seekingalpha.com##.banner728x90 has been made redundant by ##.banner728x90
worldgolf.com##.gfp-banner has been made redundant by ##.gfp-banner
billboard.biz##.bodyContent[style="padding-bottom: 30px; text-align: center;"] has been made redundant by billboard.biz##.bodyContent
billboard.biz##.bodyContent[style="padding-bottom:30px; text-align: center"] has been made redundant by billboard.biz##.bodyContent
blog.thephoenix.com##div[style="background-color:#ffffff;padding:0px;margin:15px 0px;font-size:10px;color:#999;text-align:center;"] has been made redundant by thephoenix.com##div[style="background-color:#ffffff;padding:0px;margin:15px 0px;font-size:10px;color:#999;text-align:center;"]
travel.canoe.ca##div[style="text-align:center; min-height:260px;"] has been made redundant by canoe.ca##div[style="text-align:center; min-height:260px;"]
||hazecash.com/view_banner.php$third-party has been made redundant by /view_banner.
||zedo.com^$popup,third-party has been made redundant by ||zedo.com^$popup,image,~image
||casino.williamhill.com^$popup,third-party has been made redundant by ||williamhill.com^$popup,third-party
||videoplaza.tv/creatives/assets/ has been made redundant by ||videoplaza.tv/creatives/
/top468.html$domain=thepiratebay.se|depiraatbaai.be has been made redundant by /top468.html
@@||dollarade.com/overlay_gateway.php?oid=$script,domain=pspmaniaonline.com has been made redundant by @@||dollarade.com/overlay_gateway.php?$script,domain=portable77download.blogspot.com|pspmaniaonline.com|streamaxonline.com
Finished (after 115 seconds)! 20 redundant rules found!
Fanboy's AnnoyancesFanboy Tracking wrote:||tnaflix.com/js/ga.js has been made redundant by .com/js/ga.js
||shopadidas.com^*/adidasAnalytics. has been made redundant by /adidasAnalytics.
/track/event.gif? has been made redundant by /event.gif?
||mkt931.com/lp/static/js/iMAWebCookie.js? has been made redundant by /iMAWebCookie.
/impression?$script,image has been made redundant by /impression?
/track/impression? has been made redundant by /impression?
||amazon.com/*/uedata/ has been made redundant by /uedata/*
||mint.com^*/lib/ga.js has been made redundant by ||mint.com^*/ga.js
||urc.taboolasyndication.com^*/pixel.gif has been made redundant by ||urc.taboolasyndication.com^
||targetingnow.com^$third-party has been made redundant by ||targetingnow.com^
||33across.com^$third-party has been made redundant by ||33across.com^
Finished (after 18 seconds)! 11 redundant rules found!
...worse than I remembered from last timeFanboy's Annoyances wrote:||vk.com/widget_like.php$third-party has been made redundant by ||vk.com/widget_like.php$third-party
9to5mac.com##.social-icon has been made redundant by ##.social-icon
abcnews.go.com##.social-buttons has been made redundant by ##.social-buttons
aolnews.com##.followUs has been made redundant by ##.followUs
colbertnation.com##.share_container has been made redundant by ##.share_container
frooglegeek.com###sharepost has been made redundant by ###sharepost
oneriot.com###header-social has been made redundant by ###header-social
sbnation.com##.fb-like-box has been made redundant by ##.fb-like-box
softwarequalityconnection.com##.widget_FacebookLikeBox has been made redundant by ##.widget_FacebookLikeBox
thedailyshow.com##.share_container has been made redundant by ##.share_container
toptenz.net###sharepost has been made redundant by ###sharepost
yahoo.com##.social-buttons has been made redundant by ##.social-buttons
/social-media-buttons. has been made redundant by /social-media-
/social-media-widget/* has been made redundant by /social-media-
/social-media-widget/*$image has been made redundant by /social-media-
||plusone.google.com/*/fastbutton?$third-party has been made redundant by ||plusone.google.com^$third-party
Finished (after 3 seconds)! 16 redundant rules found!
In general, go to "View List" or somehow else obtain the plain text-file that the subscription is based on, then copy the contents and paste into that redundancy-checker I linked to earlier; click "Check for redundant rules" and wait awhile, and then you can see which rules were regarded as redundant and there will be a link to see the cleaned list.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Re: Edit, Copy, and Export buttons
I noticed that one of the rules in Fanboy Tracking is .com/js/ga.js
I wonder, however, whether it would work better as ||com/js/ga.js
I tested the filter ||com^ and it turns out that || still works on a bare TLD, not just a second-level or more specific domain.
I wonder, however, whether it would work better as ||com/js/ga.js
I tested the filter ||com^ and it turns out that || still works on a bare TLD, not just a second-level or more specific domain.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Re: Edit, Copy, and Export buttons
Anyway, the redundancy-checker on adblockplus.org is outdated, not understanding the latest filter-syntax, so you should use this one instead: https://arestwo.org/famlam/redundantRuleChecker.html[/quote]lewisje wrote: ...
Why is it outdated? Who is responsible for management and maintenance of that? When will it be updated? How often does it get updated?
Re: Edit, Copy, and Export buttons
The redundancy-checker on adblockplus.org is maintained by Wladimir Palant, but (with his attention consumed by developing ABP itself) he has not gotten around to updating it yet to support the most recent changes to ABP syntax, like the $popup option to specifically block a URL from being opened in a popup window or tab; for this reason, famlam decided to whip up a more up-to-date tool.Danesh wrote:Why is it outdated? Who is responsible for management and maintenance of that? When will it be updated? How often does it get updated?
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Re: Edit, Copy, and Export buttons
Thanks for the explanations. Now, PLEASE, tell me if I should check the three filters I mentioned earlier for redundancy one by one OR all at once and in one shot, that is, in the latter case, should I put together contents of the three filters in a single one and check it for redundancy? As a matter of fact, I want to make sure that there's no any overlap or redundancy among the three filters I've subscribed to.
I sincerely appreciate your patience with me.
I sincerely appreciate your patience with me.
Re: Edit, Copy, and Export buttons
Checking a set of filters for redundancy is mostly for filter-list authors and maintainers of sets of custom filters, so I'd recommend checking for redundancies in each individual list and letting the authors know.
For your own amusement, you can also combine the subscriptions to see what filters in any given subscription may be made redundant by filters in another subscription, but this doesn't really help the list authors because other users may use different combinations of the lists; for example, someone may use EasyList with Fanboy's Annoyances, or Fanboy Adblock with Fanboy Tracking but not Fanboy's Annoyances.
It turns out to take about the same amount of time to search combined lists as individual lists; I had thought it would be quadratic in the number of filters, but a brief experiment shows it to be roughly linear but also dependent on the complexity of the filters (Fanboy Tracking takes 11 seconds and has about 4400 filters, Fanboy's Annoyances takes 3 seconds and has about 3950 filters, and combining the two takes 15 seconds).
Also, when I tested out Famlam's checker again, I noticed an update: Now it finds errors and suggests optimizations, and because I love Fanboy so much (and your OP mentioned him), I'll go ahead and test his main lists again.
Fanboy Adblock
Fanboy Tracking
Fanboy's Annoyances
all three, after all suggested optimizations were made and then the lists combinedOddly this test seems to indicate a quadratic search time, because it took much longer to test all lists combined than the sum of each individual list.
The only things that may show up in a combined list even if they don't show up in individual lists are redundancies, because while errors, warnings, optimizations, and ignored rules are evaluated in isolation, determining whether a rule is redundant requires checking against all other rules.
Also, I should mention that the link to have the corrected list open in a new tab doesn't seem to work in Chrome with ABP (or possibly in Chrome without it), and Fanboy's Annoyances has an annoying extra newline at the start of the file.
For your own amusement, you can also combine the subscriptions to see what filters in any given subscription may be made redundant by filters in another subscription, but this doesn't really help the list authors because other users may use different combinations of the lists; for example, someone may use EasyList with Fanboy's Annoyances, or Fanboy Adblock with Fanboy Tracking but not Fanboy's Annoyances.
It turns out to take about the same amount of time to search combined lists as individual lists; I had thought it would be quadratic in the number of filters, but a brief experiment shows it to be roughly linear but also dependent on the complexity of the filters (Fanboy Tracking takes 11 seconds and has about 4400 filters, Fanboy's Annoyances takes 3 seconds and has about 3950 filters, and combining the two takes 15 seconds).
Also, when I tested out Famlam's checker again, I noticed an update: Now it finds errors and suggests optimizations, and because I love Fanboy so much (and your OP mentioned him), I'll go ahead and test his main lists again.
Fanboy Adblock
Code: Select all
Finished (after 92 seconds)! 1 redundant rule found!
complaintsboard.com##.goog-border has been made redundant by complaintsboard.com##.goog-border
The following 22 errors, warnings or optimalizations were encountered while checking the rules:
(warnings)
@@||pagead2.googlesyndication.com/pagead/show_ads.js$domain=full-ngage-games.blogspot.com|oldversion.com|everythingon.tv|seeingwithsound.com|ffiles.com|articlewagon.com|codeasily.com|ngohq.com|warp2search.net|carsfromitaly.info|megaallday.com|omegadrivers.net|upfordown.com|ninjaraider.com|ffiles.com|rapid8.com|tipstank.com : Some domains ending with 'ffiles.com' are redundant
~2gb-hosting.com,~liepajniekiem.lv,~apnaohio.com,~flysaa.com,~mutualofomaha.com,~tracfone.com,~addoway.com,~apple.com,~dailykos.com,~facebook.com,~harpers.org,~radio.de,~tomwans.com,~tonprenom.com,~google.com,~zuploads.com,~wheelsmag.com.au,~zuploads.com,~superbikeplanet.com,~prosperitybanktx.com,~apc.com###ads : Some domains ending with 'zuploads.com' are redundant
~gamespot.com,~stickyguide.com,~collegehumor.com,~escapistmagazine.com,~gamespot.com,~mint.com,~slidetoplay.com,~smh.com.au,~zattoo.com##.sponsored : Some domains ending with 'gamespot.com' are redundant
~t-mobile.co.uk,~crunchbase.com,~antronio.com,~mailig.ig.com.br,~mail.ntlworld.com,~mail.virgin.net,~channel4.com,~amusingplanet.com,~apple.com,~sportsdirect.com,~burningcamel.com,~prosperitybanktx.com,~repubblica.it,~mail.google.com,~bm.ru,~fileserve.com,~motorcyclescan.com,~mallofamerica.com,~freeads.co.uk,~antronio.com##.ads : Some domains ending with 'antronio.com' are redundant
(in all cases, the domain in question was inadvertently repeated)
(optimizations)
_pop_ad/* : Unnecessary trailing wildcard found
images/ads/* : Unnecessary trailing wildcard found
|http://feeds.*/~a/* : Unnecessary trailing wildcard found
||eva.ucas.com^$third-party : Unnecessary whitespace character(s) found
||udmserve.net^$third-party : Unnecessary whitespace character(s) found
@@||inskinad.com/crossdomain.xml$domain=nme.com : Unnecessary whitespace character(s) found
@@||last.fm/adserver/video/ : Unnecessary whitespace character(s) found
@@||mads.cbs.com/mac-ad?*$domain=cbs.com,object-subrequest : Unnecessary trailing wildcard found
||theteacherscorner.net^*/check-ad-db.php : Unnecessary whitespace character(s) found
=300X250/* : Unnecessary trailing wildcard found
=468X60/* : Unnecessary trailing wildcard found
=728X90/* : Unnecessary trailing wildcard found
||freebunker.com^*/bgcont.js : Unnecessary whitespace character(s) found
hardsextube.com##*[width="900"][height="250"] : Unnecessary universal selector (*) found
securecomputing.net.au##[style="width: 97%; border: 1px solid rgb(204, 204, 204); margin: 10px 0px; padding: 0px 0px 0px 5px; background-color: White;"] : Unnecessary whitespace character(s) found
google.com##[id="adt"][align="right"] : Consider replacing '[id="adt"]' by '#adt' because it's faster
knowelty.com###text-4 : Unnecessary whitespace character(s) found
~mail.google.com,google.com##[style="border: 1px solid rgb(51, 102, 153);"] : Unnecessary whitespace character(s) found
The following 10 rules were ignored in some or all tests:
Most (partially) ignored rules are only ignored because of a lack of support from this tool. It doesn't mean a rule is broken, unless stated on the warnings tab.
~mail.google.com,google.co.in,google.com##.ts[style="margin:0 0 12px;height:92px"]
~mail.google.com,google.co.nz##table[style="border: 1px solid #0000ff"]
~mail.google.com,google.com##.c[style="margin: 0pt;"]
~mail.google.com,google.com##.ts[style="margin:0 0 12px;height:92px;width:100%"]
~mail.google.com,google.com##[style="border: 1px solid rgb(0, 90, 136);"]
~mail.google.com,google.com##[style="border: 1px solid rgb(145, 117, 77);"]
~mail.google.com,google.com##[style="border: 1px solid rgb(241, 250, 248);"]
~mail.google.com,google.com##[style="border: 1px solid rgb(51, 102, 153);"]
~mail.google.com,google.com##[style="border: 1px solid rgb(51, 102, 204);"]
~mail.google.com,google.com##div.ch[style]
Code: Select all
Finished (after 10 seconds)! No redundant rules found!
The following 7 errors, warnings or optimalizations were encountered while checking the rules:
(optimizations)
/skstats-cgi/ : Unnecessary regular expression. Use 'skstats-cgi' instead, or use '/skstats-cgi/*' if it isn't a regex
/stats.php?*http* : Unnecessary trailing wildcard found
/tracker/track*$script : Unnecessary trailing wildcard found
||dw.com.com/redir?siteid*http*$image : Unnecessary trailing wildcard found
||forbesimg.com^*/tag_pixels.js : Unnecessary whitespace character(s) found
@@||content.usaa.com/mcontent/static_assets/Media/blank.gif?* : Unnecessary trailing wildcard found
@@||secure-us.imrworldwide.com^*$domain=gametrailers.com : Unnecessary trailing wildcard found
No rules were ignored during the test
Code: Select all
Finished (after 2 seconds)! 1 redundant rule found!
||odnoklassniki.ru/share/odkl_klass_stat.gif$third-party has been made redundant by ||odnoklassniki.ru^$third-party
The following error, warning or optimalization was encountered while checking the rules:
(optimization)
@@||api.tweetmeme.com^*$domain=smashingapps.com : Unnecessary trailing wildcard found
No rules were ignored during the test
Code: Select all
Finished (after 173 seconds)! 19 redundant rules found!
||bidsystem.com^$third-party has been made redundant by ||bidsystem.com^$third-party
||domdex.com^$third-party has been made redundant by ||domdex.com^$third-party
||vemba.com^$third-party has been made redundant by ||vemba.com^$third-party
||lijit.com^$third-party has been made redundant by ||lijit.com^$third-party
||scribol.com^$third-party has been made redundant by ||scribol.com^$third-party
girlsgogames.com###leaderData has been made redundant by girlsgogames.com###leaderData
independent.co.uk##.promoAndLeaderboard has been made redundant by independent.co.uk##.promoAndLeaderboard
uproxx.com###block-728 has been made redundant by uproxx.com###block-728
amateurpovtube.info###sharebox has been made redundant by ###sharebox
networkworld.com###floating_tools[style="top: 337px; display: block;"] has been made redundant by networkworld.com###floating_tools
networkworld.com###floating_tools[style="top: 361px; display: block;"] has been made redundant by networkworld.com###floating_tools
/bing-ad-unit/* has been made redundant by -ad-unit/
||clicks.superpages.com^$third-party has been made redundant by ||clicks.superpages.com^
||tracking.hostgator.com^$third-party has been made redundant by ||tracking.hostgator.com^
||ad.turn.com^$third-party has been made redundant by ||turn.com^
||twittercounter.com^$third-party has been made redundant by ||twittercounter.com^
||ru4.com^$third-party has been made redundant by ||ru4.com^
||tracking.badgeville.com^$third-party has been made redundant by ||badgeville.com^$third-party
||ad.sharethis.com^$third-party has been made redundant by ||sharethis.com^$third-party
(many of these resulted from particular filters being relevant for more than one list)
No errors or warnings were encountered while checking the rules
The following 10 rules were ignored in some or all tests:
Most (partially) ignored rules are only ignored because of a lack of support from this tool. It doesn't mean a rule is broken, unless stated on the warnings tab.
~mail.google.com,google.co.in,google.com##.ts[style="margin:0 0 12px;height:92px"]
~mail.google.com,google.co.nz##table[style="border: 1px solid #0000ff"]
~mail.google.com,google.com##.c[style="margin: 0pt;"]
~mail.google.com,google.com##.ts[style="margin:0 0 12px;height:92px;width:100%"]
~mail.google.com,google.com##[style="border: 1px solid rgb(0, 90, 136);"]
~mail.google.com,google.com##[style="border: 1px solid rgb(145, 117, 77);"]
~mail.google.com,google.com##[style="border: 1px solid rgb(241, 250, 248);"]
~mail.google.com,google.com##[style="border: 1px solid rgb(51, 102, 153);"]
~mail.google.com,google.com##[style="border: 1px solid rgb(51, 102, 204);"]
~mail.google.com,google.com##div.ch[style]
The only things that may show up in a combined list even if they don't show up in individual lists are redundancies, because while errors, warnings, optimizations, and ignored rules are evaluated in isolation, determining whether a rule is redundant requires checking against all other rules.
Also, I should mention that the link to have the corrected list open in a new tab doesn't seem to work in Chrome with ABP (or possibly in Chrome without it), and Fanboy's Annoyances has an annoying extra newline at the start of the file.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Re: Edit, Copy, and Export buttons
https://hg.fanboy.co.nz/rev/fd1ae6bc395f
Cleaned up most of it, though the combination won't be touched yet, since some filters will exist twice... where 3rd party rules wont apply if visiting the site directly.
Cleaned up most of it, though the combination won't be touched yet, since some filters will exist twice... where 3rd party rules wont apply if visiting the site directly.
Re: Edit, Copy, and Export buttons
THANK YOU dear lewisje for the thorough comment. All in all, I understand from the comment that, as an ordinary user, I'd better suffice to check the filters separately. Right? OR there's no need to do that at all as they're updated regularly and automatically?
Re: Edit, Copy, and Export buttons
They're updated regularly by the authors, and ABP will look for updated versions as often as the lists themselves specify, or if not specified then about once every 5 days; you can of course force a refresh as often as you want, and most likely you will want to do this if you have reported a false positive in a list, it gets fixed, and you want the fix right then.
(Don't do it too often, like once every hour, or your IP address might get banned by the servers hosting the lists as an attempted DDoS attack.)
Anyway, you should indeed just worry about checking the lists individually.
Now, famlam actually sent me a PM that lays out how long it actually takes, and it goes along with what I had started thinking about...
First, I started thinking that for the most part, blocking, exception, and hiding rules wouldn't affect each other in terms of redundancy, so the number of checks required isn't nearly as large as N^2-N (the number of non-symmetric comparisons of each filter with the others).
Now in fact it is possible for an exception rule to render a blocking rule moot, like ||adwords.google.com^ would be rendered moot by @@||google.com^$document, but mootness is not quite the same as redundancy, so it is not tested, and the three categories of rules are tested separately.
Also, it turns out that negative-domain-based hiding rules are not currently supported, but when they are they will likely be tested as global hiding rules, because they apply to almost all domains.
The PM mentioned that site-specific rules (applied to specific domains, like something$domain=te.st or te.st##something) are treated almost separately from global rules (applied to all domains, possibly excepting some specific domains, like something$domain=~te.st or ||te.st^ or ##something or ~te.st##something, the last of which, as said before, is not currently supported by the tool): If the number of site-specific rules is denoted with the suffix S, global rules with the suffix G, blocking rules with the prefix B, exception rules with the prefix E, and hiding rules with the prefix H (so that N=G+S=B+E+H, B=BG+BS, E=EG+ES, H=HG+HS, G=BG+EG+HG, and S=BS+ES+HS), then a rough measurement of the number of comparisons required is BG^2+BG*BS+BS+EG^2+EG*ES+ES+HG^2+HG*HS+HS, which is generally smaller than N^2-N, linear in site-specific filters, and quadratic in each category of global filters.
He noted that in fact the comparison time also depends on the number of special characters within each blocking or exception rule (such as || or | or * or ^) and the number of selectors within each hiding rule (like div or [href*="livejasmin.net"]), and there are other mechanisms to prevent useless calculations.
(Don't do it too often, like once every hour, or your IP address might get banned by the servers hosting the lists as an attempted DDoS attack.)
Anyway, you should indeed just worry about checking the lists individually.
Now, famlam actually sent me a PM that lays out how long it actually takes, and it goes along with what I had started thinking about...
First, I started thinking that for the most part, blocking, exception, and hiding rules wouldn't affect each other in terms of redundancy, so the number of checks required isn't nearly as large as N^2-N (the number of non-symmetric comparisons of each filter with the others).
Now in fact it is possible for an exception rule to render a blocking rule moot, like ||adwords.google.com^ would be rendered moot by @@||google.com^$document, but mootness is not quite the same as redundancy, so it is not tested, and the three categories of rules are tested separately.
Also, it turns out that negative-domain-based hiding rules are not currently supported, but when they are they will likely be tested as global hiding rules, because they apply to almost all domains.
The PM mentioned that site-specific rules (applied to specific domains, like something$domain=te.st or te.st##something) are treated almost separately from global rules (applied to all domains, possibly excepting some specific domains, like something$domain=~te.st or ||te.st^ or ##something or ~te.st##something, the last of which, as said before, is not currently supported by the tool): If the number of site-specific rules is denoted with the suffix S, global rules with the suffix G, blocking rules with the prefix B, exception rules with the prefix E, and hiding rules with the prefix H (so that N=G+S=B+E+H, B=BG+BS, E=EG+ES, H=HG+HS, G=BG+EG+HG, and S=BS+ES+HS), then a rough measurement of the number of comparisons required is BG^2+BG*BS+BS+EG^2+EG*ES+ES+HG^2+HG*HS+HS, which is generally smaller than N^2-N, linear in site-specific filters, and quadratic in each category of global filters.
He noted that in fact the comparison time also depends on the number of special characters within each blocking or exception rule (such as || or | or * or ^) and the number of selectors within each hiding rule (like div or [href*="livejasmin.net"]), and there are other mechanisms to prevent useless calculations.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Re: Edit, Copy, and Export buttons
It's on my TODO listNow in fact it is possible for an exception rule to render a blocking rule moot, like ||adwords.google.com^ would be rendered moot by @@||google.com^$document, but mootness is not quite the same as redundancy, so it is not tested, and the three categories of rules are tested separately.
However, the two you mention are not moot: on domain foo.com, ||adwords.google.com^ could still match as a third-party resource, because that filter doesn't mention $~third-party nor $domain=google.com. The @@ one however, does only match on google.com.
They are supported. Probably you misunderstood that: only for the 'speed calculation' they can be classified the same, that's what I meant. So ~te.st##something is supported. Try ~a###c and ~b###c. If they were considered global, they would make each other redundant. Now they only trigger a warning .Also, it turns out that negative-domain-based hiding rules are not currently supported, but when they are they will likely be tested as global hiding rules, because they apply to almost all domains.
without "|". Just ||, * and ^. | is very fast.(such as || or | or * or ^)
My PM wrote:there are some mechanisms that cause the actual check time for fanboys list not to be
20000^2 - 20000 = about 400,000,000 checks, but just
globalHiding^2 + globalHiding*siteSpecificHiding+ siteSpecificHiding+ globalBlocking^2 + globalBlocking*siteSpecificBlocking+ siteSpecificBlocking+ globalWhitelist^2 + globalWhitelist*siteSpeficWhitelist+ siteSpeficWhitelist checks.
For fanboy, this would be 6000^2+6000*10000+10000+6850^2+6850*50+50+300^2+300*225+225=about 143,000,000 checks
Now you can pretty accurately calculate which takes the longest: tracking has nearly only global blocking rules (say 4000^2=16,000,000 checks), while annoyances has blocking and hiding, both global as site specific (if they were equally balanced, it would be about 4,000,000 checks.)
[...]
*Note: siteSpecific = filters with somedomain##foo or something$domain=foo. Global = filters with $domain=~somedomain or no $domain= or ~somedomain##foo or ##foo in this formula.
Re: Edit, Copy, and Export buttons
I misunderstood the meaning of $document for a while there, sorry; I guess that means simply that ABP will be disabled when the URL in the address bar matches that rule, not that it adds the initial document request to the set of request types that will be matched (in fact, the initial document request is never blocked by ABP to begin with, as a design decision)...I think I meant to say that ||adwords.google.com^ would be rendered moot by @@||google.com^famlam wrote:It's on my TODO listlewisje wrote:Now in fact it is possible for an exception rule to render a blocking rule moot, like ||adwords.google.com^ would be rendered moot by @@||google.com^$document, but mootness is not quite the same as redundancy, so it is not tested, and the three categories of rules are tested separately.
However, the two you mention are not moot: on domain foo.com, ||adwords.google.com^ could still match as a third-party resource, because that filter doesn't mention $~third-party nor $domain=google.com. The @@ one however, does only match on google.com.
Sorry, looking at the set of filters from Fanboy Adblock that were ignored because they weren't supported, it seems as if maybe the problem is with hiding rules with more than one domain specifier, or it could be just with hiding rules with a negative-domain specifier and a domain specifier; the simplest example of a hiding rule from Fanboy Adblock that the redundancy-checker did not support is ~mail.google.com,google.com##div.ch[style], which I believe means "on google.com and all subdomains except mail.google.com, hide all div elements of class 'ch' with an explicit style attribute"famlam wrote:They are supported. Probably you misunderstood that: only for the 'speed calculation' they can be classified the same, that's what I meant. So ~te.st##something is supported. Try ~a###c and ~b###c. If they were considered global, they would make each other redundant. Now they only trigger a warning.lewisje wrote:Also, it turns out that negative-domain-based hiding rules are not currently supported, but when they are they will likely be tested as global hiding rules, because they apply to almost all domains.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.