isolateMinLength static method

int isolateMinLength(
  1. int level
)

The minimal length to encodeAsync in the compressionIsolatePool at level.

Starts at about 1.5ms of encoding (JSON, AOT), as APIBrotli.isolateMinLength: an encoding costs about the same in a pool worker as inline (+0.1ms).

Implementation

static int isolateMinLength(int level) {
  if (level >= 9) return 192 * 1024; // ~1.9ms inline.
  if (level >= 6) return 384 * 1024; // ~1.6ms inline.
  return 768 * 1024; // ~1.6ms inline.
}