Browse Source

Perf: early bail out more filter pattern

SukkaW 1 year ago
parent
commit
eca2949062
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Build/lib/parse-filter.ts

+ 1 - 1
Build/lib/parse-filter.ts

@@ -133,7 +133,6 @@ export async function processFilterRules(
   parentSpan: Span,
   parentSpan: Span,
   filterRulesUrl: string,
   filterRulesUrl: string,
   fallbackUrls?: string[] | null,
   fallbackUrls?: string[] | null,
-  _ttl: number | null = null,
   allowThirdParty = false
   allowThirdParty = false
 ): Promise<{ white: string[], black: string[], foundDebugDomain: boolean }> {
 ): Promise<{ white: string[], black: string[], foundDebugDomain: boolean }> {
   const [white, black, warningMessages] = await parentSpan.traceChild(`process filter rules: ${filterRulesUrl}`).traceAsyncFn(async (span) => {
   const [white, black, warningMessages] = await parentSpan.traceChild(`process filter rules: ${filterRulesUrl}`).traceAsyncFn(async (span) => {
@@ -256,6 +255,7 @@ const kwfilter = createKeywordFilter([
   '$popunder',
   '$popunder',
   '$cname',
   '$cname',
   '$frame',
   '$frame',
+  '$domain',
   // some bad syntax
   // some bad syntax
   '^popup'
   '^popup'
 ]);
 ]);