File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
packages/gatsby-plugin-sharp/src Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 11const path = require ( `path` )
22const queue = require ( `async/queue` )
3+ const { cpuCoreCount } = require ( `gatsby-core-utils` )
34const { processFile } = require ( `./process-file` )
45
56exports . IMAGE_PROCESSING_JOB_NAME = `IMAGE_PROCESSING`
@@ -31,7 +32,7 @@ const q = queue(
3132 args . pluginOptions
3233 )
3334 ) ,
34- 1
35+ cpuCoreCount ( )
3536)
3637
3738/**
Original file line number Diff line number Diff line change @@ -8,18 +8,16 @@ const imageminMozjpeg = require(`imagemin-mozjpeg`)
88const imageminPngquant = require ( `imagemin-pngquant` )
99const { healOptions } = require ( `./plugin-options` )
1010const { SharpError } = require ( `./sharp-error` )
11- const { cpuCoreCount , createContentDigest } = require ( `gatsby-core-utils` )
11+ const { createContentDigest } = require ( `gatsby-core-utils` )
1212
1313// Try to enable the use of SIMD instructions. Seems to provide a smallish
1414// speedup on resizing heavy loads (~10%). Sharp disables this feature by
1515// default as there's been problems with segfaulting in the past but we'll be
1616// adventurous and see what happens with it on.
1717sharp . simd ( true )
1818
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 )
2321
2422/**
2523 * @typedef DuotoneArgs
You can’t perform that action at this time.
0 commit comments