mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-07-14 01:31:49 +08:00
fix (ip-flag.js): Use batch processing to reduce memory footprint
This commit is contained in:
parent
eb32a09def
commit
5845ea1a66
@ -74,7 +74,7 @@ async function operator(proxies) {
|
|||||||
let i = 0;
|
let i = 0;
|
||||||
while (i < proxies.length) {
|
while (i < proxies.length) {
|
||||||
const batch = proxies.slice(i, i + BATCH_SIZE);
|
const batch = proxies.slice(i, i + BATCH_SIZE);
|
||||||
await Promise.all(proxies.map(async proxy => {
|
await Promise.all(batch.map(async proxy => {
|
||||||
try {
|
try {
|
||||||
// remove the original flag
|
// remove the original flag
|
||||||
let proxyName = removeFlag(proxy.name);
|
let proxyName = removeFlag(proxy.name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user