autoParallel static method

int autoParallel()

A conservative default: one build per ~8 GB of RAM and per 4 CPU cores, between 1 and 4.

Implementation

static int autoParallel() {
  final cores = Platform.numberOfProcessors;
  final ramGb = _totalRamGb() ?? 16;
  return math.max(1, math.min(4, math.min(ramGb ~/ 8, cores ~/ 4)));
}