Perf: run reverse chn cidr in worker_threads

This commit is contained in:
SukkaW
2025-01-10 00:17:28 +08:00
parent 996575236d
commit 7e5fad3362
5 changed files with 78 additions and 21 deletions

View File

@@ -16,7 +16,7 @@ const PROBE_CHN_CIDR_V4 = [
'120.78.92.171'
];
export const getChnCidrPromise = createMemoizedPromise(cachedOnlyFail(
export const getChnCidrPromise = createMemoizedPromise(cachedOnlyFail<[], [string[], string[]]>(
async function getChnCidr() {
const [_cidr4, cidr6] = await Promise.all([
fetchRemoteTextByLine('https://raw.githubusercontent.com/misakaio/chnroutes2/master/chnroutes.txt', true).then(Array.fromAsync<string>),