Perf: run cpu intensive task with worker

This commit is contained in:
SukkaW
2023-09-14 22:08:01 +08:00
parent b42bd05ccf
commit 2448cbe39a
6 changed files with 131 additions and 11 deletions

View File

@@ -33,7 +33,7 @@ const buildRejectDomainSet = task(__dirname, async () => {
let shouldStop = false;
const [gorhill] = await Promise.all([
getGorhillPublicSuffixPromise,
getGorhillPublicSuffixPromise(),
// Parse from remote hosts & domain lists
...HOSTS.map(entry => processHosts(entry[0], entry[1]).then(hosts => {
hosts.forEach(host => {