Default thread pools

Lenses uses Scala’s default execution context for some operations, and this is backed by a thread pool whose size is based on the number of cores on the system. In some kubernetes/docker configurations, this may be just a single core, resulting in a thread pool size of 1. Although this will not prevent Lenses from working, having more than one thread will lead to better performance for some operations. The default execution context thread pool size can be set to 4 with the following environment variable:

JAVA_TOOL_OPTIONS="-Dscala.concurrent.context.maxThreads=4 -Dscala.concurrent.context.numThreads=4"
Last modified: July 17, 2024