From baa130b0f748d9555d070858ffb103ad78b4b30c Mon Sep 17 00:00:00 2001 From: Peng-YM <1048217874pengym@gmail.com> Date: Fri, 9 Sep 2022 21:05:05 +0800 Subject: [PATCH] fix (ip-flag.js): Use batch processing to reduce memory footprint --- scripts/ip-flag.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ip-flag.js b/scripts/ip-flag.js index 1ae0ecf..7982dca 100644 --- a/scripts/ip-flag.js +++ b/scripts/ip-flag.js @@ -74,7 +74,7 @@ async function operator(proxies) { let i = 0; while (i < proxies.length) { const batch = proxies.slice(i, i + BATCH_SIZE); - await Promise.all(proxies.map(async proxy => { + await Promise.all(batch.map(async proxy => { try { // remove the original flag let proxyName = removeFlag(proxy.name);