perf(build): raise hike image-encode concurrency cap to 10
Allow up to 10 parallel image pipelines (was 4) on hosts with the cores to spare.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "homepage",
|
"name": "homepage",
|
||||||
"version": "1.89.1",
|
"version": "1.89.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ const VALID_DIFFICULTIES: readonly Difficulty[] = ['T1', 'T2', 'T3', 'T4', 'T5',
|
|||||||
// Sharp pipelines are CPU-heavy but release the JS thread while libvips runs,
|
// Sharp pipelines are CPU-heavy but release the JS thread while libvips runs,
|
||||||
// so a small concurrency pool gives a near-linear speed-up. Cap at 4 to avoid
|
// so a small concurrency pool gives a near-linear speed-up. Cap at 4 to avoid
|
||||||
// thrashing on smaller boxes (a single AVIF encode can saturate one core).
|
// thrashing on smaller boxes (a single AVIF encode can saturate one core).
|
||||||
const IMAGE_CONCURRENCY = Math.max(2, Math.min(os.cpus().length, 4));
|
const IMAGE_CONCURRENCY = Math.max(2, Math.min(os.cpus().length, 10));
|
||||||
|
|
||||||
async function pathExists(p: string): Promise<boolean> {
|
async function pathExists(p: string): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user