 Issue 29877558:
  Noissue - Avoid redundant lookup in keyword-by-filter map  (Closed) 
  Base URL: https://hg.adblockplus.org/adblockpluscore/
    
  
    Issue 29877558:
  Noissue - Avoid redundant lookup in keyword-by-filter map  (Closed) 
  Base URL: https://hg.adblockplus.org/adblockpluscore/| Index: lib/matcher.js | 
| =================================================================== | 
| --- a/lib/matcher.js | 
| +++ b/lib/matcher.js | 
| @@ -341,18 +341,19 @@ | 
| * @param {RegExpFilter} filter | 
| * @returns {boolean} | 
| */ | 
| isSlowFilter(filter) | 
| { | 
| let matcher = ( | 
| filter instanceof WhitelistFilter ? this.whitelist : this.blacklist | 
| ); | 
| - if (matcher.hasFilter(filter)) | 
| - return !matcher.getKeywordForFilter(filter); | 
| + let keyword = matcher.getKeywordForFilter(filter); | 
| + if (keyword != null) | 
| + return keyword == ""; | 
| 
Manish Jethani
2018/09/18 14:10:26
Well hold on, if we change this here to `keyword =
 | 
| return !matcher.findKeyword(filter); | 
| } | 
| /** | 
| * Optimized filter matching testing both whitelist and blacklist matchers | 
| * simultaneously. For parameters see | 
| {@link Matcher#matchesAny Matcher.matchesAny()}. | 
| * @see Matcher#matchesAny |