I have a couple of filter performance questions:
1.) Two of my most hit filters are too short to be optimized:
ads2.*
|http://*/ads/
They're the only filters with the problem in my list, which contains 25 ad blocking rules. How much slower is my browsing because of these two non-optimizable rules?
2.) I've started hiding several elements on several http://www.example.com sites (e.g., mail.example.com, news.example.com, maps.example.com, images.example.com, etc.). These filters only apply to specific sites (e.g., maps.google.com). How are the filters applied by the extension? Suppose I have 10 example.com sites with 10 site-specfic elements blocked on each site. In calculating the number of filters applied on each page load, should I assume that the extension processes all 100 of these filters? Or does it only process the ones relevant to the specific site?
(I understand that the more example.com sites for which I have site specific filters, the longer the extension will take to load all pages, because it always has to check whether the current site has any site specific filters.)
Performance hit caused by filters too short to be optimized?
Re: Performance hit caused by filters too short to be optimized?
1) Non-optimized filters add delay linearly - 10 filters add 10 times the delay of one filter. If you only have two "non-optimized" filters the delay should still not be noticeable. I think it takes at least 20 filters to get into the area where you can notice the difference (complicated regular expressions can get there faster of course).
2) Element hiding rules are processed by browser's CSS engine. I don't know all the details on how it works - but site-specific filters definitely don't slow anything down unless you browse that site. "Global" filters are more of a problem, they are active on all websites.
2) Element hiding rules are processed by browser's CSS engine. I don't know all the details on how it works - but site-specific filters definitely don't slow anything down unless you browse that site. "Global" filters are more of a problem, they are active on all websites.
Re: Performance hit caused by filters too short to be optimized?
Thanks for your reply, and for all the work you've put into the extension!