Perf: a few improvements to trie

This commit is contained in:
SukkaW
2024-09-18 14:05:07 +08:00
parent a004ffb960
commit 3bd0ebe36e
2 changed files with 31 additions and 29 deletions

View File

@@ -160,11 +160,11 @@ const processRuleSet = (ruleSet: string[]) => {
}
}
const dumped = trie.dumpWithMeta();
const dumped = trie.dumpMeta();
for (let i = 0, len = dumped.length; i < len; i++) {
const originalIndex = unpackFirst(dumped[i][1]);
const flag = unpackSecond(dumped[i][1]);
const originalIndex = unpackFirst(dumped[i]);
const flag = unpackSecond(dumped[i]);
const type = flag === flagDomain ? 'DOMAIN' : 'DOMAIN-SUFFIX';