mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Docs: expand info about parallelism and concurrency control #4411
This commit is contained in:
@@ -135,15 +135,9 @@ cache(true);
|
||||
* e.g. libaom manages its own 4 threads when encoding AVIF images,
|
||||
* and these are independent of the value set here.
|
||||
*
|
||||
* The maximum number of images that sharp can process in parallel
|
||||
* is controlled by libuv's `UV_THREADPOOL_SIZE` environment variable,
|
||||
* which defaults to 4.
|
||||
*
|
||||
* https://nodejs.org/api/cli.html#uv_threadpool_sizesize
|
||||
*
|
||||
* For example, by default, a machine with 8 CPU cores will process
|
||||
* 4 images in parallel and use up to 8 threads per image,
|
||||
* so there will be up to 32 concurrent threads.
|
||||
* :::note
|
||||
* Further {@link /performance|control over performance} is available.
|
||||
* :::
|
||||
*
|
||||
* @example
|
||||
* const threads = sharp.concurrency(); // 4
|
||||
|
||||
Reference in New Issue
Block a user