Perf: reduce infra runtime costs

This commit is contained in:
SukkaW
2023-09-14 21:11:43 +08:00
parent 0a4c99ab0e
commit b42bd05ccf
23 changed files with 172 additions and 265 deletions

View File

@@ -1,9 +1,9 @@
const path = require('path');
const { createRuleset } = require('./lib/create-file');
const { parseFelixDnsmasq } = require('./lib/parse-dnsmasq');
const { runner } = require('./lib/trace-runner');
const { runner, task } = require('./lib/trace-runner');
const buildAppleCdn = async () => {
const buildAppleCdn = task(__filename, async () => {
const res = await parseFelixDnsmasq('https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/apple.china.conf');
const description = [
@@ -40,7 +40,7 @@ const buildAppleCdn = async () => {
path.resolve(__dirname, '../Clash/domainset/apple_cdn.txt')
)
]);
};
});
module.exports.buildAppleCdn = buildAppleCdn;