Concurrency queue should slice per output image, not input image
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 467
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
The global Image.concurrency option is set as the concurrency limit for Images and not their underlying processes. An Image can have multiple formats and widths, and all of them are processed with sharp simultaneously, which can be really inefficient, increase resource usage, and reduce performance (not to mention break builds on some platforms!).
IMHO Image.concurrency should be set as the maximum concurrency of the individual output processes, not the Images. I already have a working patch for this that simply uses the global PQueue for the sharp Promises instead of the Images. Another less optimal solution could be to introduce another option that controls actual processing concurrency.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Image.concurrency, the global PQueue, and the sharp Promises described in the issue. Confirm how formats and widths are currently queued, then verify that concurrency is limited per output process and that builds no longer run all outputs simultaneously.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- performance, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100