fix (ip-flag.js): Use batch processing to reduce memory footprint

This commit is contained in:
Peng-YM
2022-09-09 21:05:05 +08:00
parent 7b2b246b92
commit baa130b0f7

View File

@@ -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);