mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-15 02:30:37 +08:00
Perf: make dedupe faster
This commit is contained in:
parent
bf4c92cc5d
commit
6aeb5def04
@ -1,7 +1,7 @@
|
||||
// @ts-check
|
||||
const Piscina = require('piscina');
|
||||
// const { isCI } = require('ci-info');
|
||||
|
||||
/** @type {string[]} */
|
||||
const fullsetDomainStartsWithADot = Piscina.workerData
|
||||
const totalLen = fullsetDomainStartsWithADot.length;
|
||||
|
||||
@ -35,7 +35,7 @@ module.exports = ({ chunk }) => {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} else if (domainFromInputChunk.endsWith(domainStartsWithADotAndFromFullSet)) {
|
||||
} else if (domainFromInputLen > domainFromFullSetLen && domainFromInputChunk.endsWith(domainStartsWithADotAndFromFullSet)) {
|
||||
outputToBeRemoved[i] = 1;
|
||||
// log(domainFromInputChunk, domainStartsWithADotAndFromFullSet)
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user