apiPool

Members

(static, constant) DEFAULT_WIDTH

Width for devices not on the low-memory list. Do not change without measuring on device (npm run measure). See the doc above.

Default Value
  • 6

(static, constant) LOW_MEMORY_WIDTH

Width for 512 MB devices (m.global.device.isLowMemoryDevice).

Default Value
  • 4

Methods

(static) currentWidth() → {integer}

The width this session's pool was created with (m.global.apiPoolWidth). Falls back to LOW_MEMORY_WIDTH when the field is absent (before setGlobalNodes() has run, or in a unit test), because asking for fewer slots than exist only queues requests, while asking for more would count slots that were never created. On a Task thread each call is a cross-thread read: call it once per run, not once per request.

Returns:
Type: 
integer

(static) widthFor(isLowMemoryDevice) → {integer}

The pool width for a device class. Called once, in setGlobalNodes().

Parameters:
NameTypeDescription
isLowMemoryDeviceboolean
Returns:
Type: 
integer