Conversation
Prevents race conditions where multiple build tasks trigger redundant `sharp` image processing for the same file. Uses a `Map` to track in-flight resize promises and reuse them. Co-authored-by: si <18108+si@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
11ty | 2eb8f4e | Feb 17 2026, 11:37 AM |
Prevents race conditions where multiple build tasks trigger redundant `sharp` image processing for the same file. Uses a `Map` to track in-flight resize promises and reuse them. (Reverted lockfile changes to fix CI build) Co-authored-by: si <18108+si@users.noreply.github.com>
Prevents race conditions where multiple build tasks trigger redundant `sharp` image processing for the same file. Uses a `Map` to track in-flight resize promises and reuse them. Additionally, lazy-loads `sharp` and `fs` dependencies to ensure compatibility with Cloudflare Workers build environments that may bundle this file but not support these native modules at runtime. Co-authored-by: si <18108+si@users.noreply.github.com>
Prevents race conditions where multiple build tasks trigger redundant
`sharp` image processing for the same file. Uses a `Map` to track
in-flight resize promises and reuse them.
Additionally, uses `eval("require")` for `sharp` and `fs` to bypass
bundler static analysis, fixing Cloudflare Workers build failures.
Co-authored-by: si <18108+si@users.noreply.github.com>
✅ Deploy Preview for sijobling ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for si-jobling ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
💡 What:
_11ty/srcset.jsusing a module-levelMap(inFlight) to track pending image resize operations.sharpprocess..finally()on the promise chain to ensure the map entry is removed after the operation completes (success or failure).🎯 Why:
resizechecked for file existence, then startedsharp. If multiple build tasks requested the same resize concurrently, they would all see the file as missing and trigger redundantsharpprocessing, wasting CPU and I/O.sharpinvocations during parallel builds (e.g., from 20 calls to 4 calls for 5 concurrent requests of 4 sizes).📊 Measured Improvement:
repro_test.js) that simulated 5 concurrent requests for the same image (generating 4 sizes each).sharpcalls.sharpcalls (1 per unique size).sharpcalls for this specific scenario.npm test).PR created automatically by Jules for task 6831872195030513611 started by @si