Perf: offload Telegram CIDR fetching into separate thread

This commit is contained in:
SukkaW
2025-12-10 16:31:15 +08:00
parent f41bb4a3b8
commit 6a35d3e4a6
7 changed files with 174 additions and 148 deletions

View File

@@ -79,10 +79,13 @@ export const buildCdnDownloadConf = task(require.main === module, __filename)(as
downloadDomainSet,
steamDomainSet
] = await Promise.all([
span.traceChildAsync('download public suffix list for s3', () => pool.exec(
'getS3OSSDomains',
[__filename]
).finally(() => pool.terminate())),
span.traceChildAsync(
'download public suffix list for s3',
() => pool.exec(
'getS3OSSDomains',
[__filename]
).finally(() => pool.terminate())
),
cdnDomainsListPromise,
downloadDomainSetPromise,
steamDomainSetPromise