mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +08:00
Perf: make reject ruleset dedupe faster
This commit is contained in:
parent
43824facb5
commit
2c1dcd200d
@ -281,16 +281,16 @@ const threads = isCI ? cpuCount : cpuCount / 2;
|
||||
for (const domain of domainSets) {
|
||||
let isTobeRemoved = false;
|
||||
|
||||
for (const keyword of domainKeywordsSet) {
|
||||
if (domain.includes(keyword)) {
|
||||
for (const suffix of domainSuffixSet) {
|
||||
if (domain.endsWith(suffix)) {
|
||||
isTobeRemoved = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isTobeRemoved) {
|
||||
for (const suffix of domainSuffixSet) {
|
||||
if (domain.endsWith(suffix)) {
|
||||
for (const keyword of domainKeywordsSet) {
|
||||
if (domain.includes(keyword)) {
|
||||
isTobeRemoved = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user