mirror of
https://github.com/SukkaW/Surge.git
synced 2026-02-02 20:11:54 +08:00
Perf: re-use trie when building reject domainsets
This commit is contained in:
@@ -448,8 +448,13 @@ export const createTrie = (from?: string[] | Set<string> | null, hostnameMode =
|
||||
return root;
|
||||
},
|
||||
whitelist,
|
||||
[Bun.inspect.custom]: () => JSON.stringify(deepTrieNodeToJSON(root), null, 2)
|
||||
[Bun.inspect.custom]: () => JSON.stringify(deepTrieNodeToJSON(root), null, 2),
|
||||
|
||||
hostnameMode,
|
||||
smolTree
|
||||
};
|
||||
};
|
||||
|
||||
export type Trie = ReturnType<typeof createTrie>;
|
||||
|
||||
export default createTrie;
|
||||
|
||||
Reference in New Issue
Block a user