Open 0x3dev opened 1 year ago
That's a good ask. I'll leave it open if someone wants to take it as it will take time to implement and test. Here's my take on how to implement it:
runLoop
.
For Example:
async function someModule(arb, ...) {
const candidates = arb.ast.filter // ...
const runningFuncs = [];
for (const c of candidates) {
runningFuncs.push(async function(c) {
// logic
});
}
await Promise.all(runningFuncs);
return arb;
}
The overall work is pretty slow on a 20k lines file so making use of
worker_threads
module and adding a param to specify threads count should help a lot.