File tree 2 files changed +5
-6
lines changed
packages/gatsby-plugin-sharp/src
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
1
const path = require ( `path` )
2
2
const queue = require ( `async/queue` )
3
+ const { cpuCoreCount } = require ( `gatsby-core-utils` )
3
4
const { processFile } = require ( `./process-file` )
4
5
5
6
exports . IMAGE_PROCESSING_JOB_NAME = `IMAGE_PROCESSING`
@@ -31,7 +32,7 @@ const q = queue(
31
32
args . pluginOptions
32
33
)
33
34
) ,
34
- 1
35
+ cpuCoreCount ( )
35
36
)
36
37
37
38
/**
Original file line number Diff line number Diff line change @@ -8,18 +8,16 @@ const imageminMozjpeg = require(`imagemin-mozjpeg`)
8
8
const imageminPngquant = require ( `imagemin-pngquant` )
9
9
const { healOptions } = require ( `./plugin-options` )
10
10
const { SharpError } = require ( `./sharp-error` )
11
- const { cpuCoreCount , createContentDigest } = require ( `gatsby-core-utils` )
11
+ const { createContentDigest } = require ( `gatsby-core-utils` )
12
12
13
13
// Try to enable the use of SIMD instructions. Seems to provide a smallish
14
14
// speedup on resizing heavy loads (~10%). Sharp disables this feature by
15
15
// default as there's been problems with segfaulting in the past but we'll be
16
16
// adventurous and see what happens with it on.
17
17
sharp . simd ( true )
18
18
19
- // Handle Sharp's concurrency based on the Gatsby CPU count
20
- // See: http://sharp.pixelplumbing.com/en/stable/api-utility/#concurrency
21
- // See: https://www.gatsbyjs.org/docs/multi-core-builds/
22
- sharp . concurrency ( cpuCoreCount ( ) )
19
+ // Concurrency is handled in gatsby-worker queue instead
20
+ sharp . concurrency ( 1 )
23
21
24
22
/**
25
23
* @typedef DuotoneArgs
You can’t perform that action at this time.
0 commit comments