mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Reduce default concurrency for musl thread over-subscription
https://github.com/lovell/sharp-libvips/issues/229
This commit is contained in:
parent
93c615d39f
commit
da655a1859
@ -8,6 +8,8 @@ Requires libvips v8.15.2
|
|||||||
|
|
||||||
* Remove experimental status from `pipelineColourspace`.
|
* Remove experimental status from `pipelineColourspace`.
|
||||||
|
|
||||||
|
* Reduce default concurrency when musl thread over-subscription detected.
|
||||||
|
|
||||||
* TypeScript: add missing definitions for `OverlayOptions`.
|
* TypeScript: add missing definitions for `OverlayOptions`.
|
||||||
[#4048](https://github.com/lovell/sharp/pull/4048)
|
[#4048](https://github.com/lovell/sharp/pull/4048)
|
||||||
[@ike-gg](https://github.com/ike-gg)
|
[@ike-gg](https://github.com/ike-gg)
|
||||||
|
@ -153,6 +153,9 @@ function concurrency (concurrency) {
|
|||||||
if (detectLibc.familySync() === detectLibc.GLIBC && !sharp._isUsingJemalloc()) {
|
if (detectLibc.familySync() === detectLibc.GLIBC && !sharp._isUsingJemalloc()) {
|
||||||
// Reduce default concurrency to 1 when using glibc memory allocator
|
// Reduce default concurrency to 1 when using glibc memory allocator
|
||||||
sharp.concurrency(1);
|
sharp.concurrency(1);
|
||||||
|
} else if (detectLibc.familySync() === detectLibc.MUSL && sharp.concurrency() === 1024) {
|
||||||
|
// Reduce default concurrency when musl thread over-subscription detected
|
||||||
|
sharp.concurrency(require('node:os').availableParallelism());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user