Skip to content

⚡ Bolt: Offload lightbox image decoding from main thread#49

Merged
ImChong merged 1 commit into
mainfrom
bolt/lightbox-async-decode-11312640668267203817
May 31, 2026
Merged

⚡ Bolt: Offload lightbox image decoding from main thread#49
ImChong merged 1 commit into
mainfrom
bolt/lightbox-async-decode-11312640668267203817

Conversation

@ImChong
Copy link
Copy Markdown
Owner

@ImChong ImChong commented May 31, 2026

💡 What: Added decoding="async" to the dynamically created image element in js/lightbox.js.
🎯 Why: When a high-resolution image is loaded into the lightbox, synchronous decoding can block the main thread, causing jank in the UI or animations. This optimization ensures decoding happens off the main thread.
📊 Impact: Reduces main-thread blocking time when viewing large images in the lightbox, improving responsiveness.
🔬 Measurement: Verify by opening a large image in the lightbox using Chrome DevTools Performance tab and observing reduced "Image Decode" time on the main thread.


PR created automatically by Jules for task 11312640668267203817 started by @ImChong

💡 What: Added `decoding="async"` to the dynamically created image element in `js/lightbox.js`.
🎯 Why: When a high-resolution image is loaded into the lightbox, synchronous decoding can block the main thread, causing jank in the UI or animations. This optimization ensures decoding happens off the main thread.
📊 Impact: Reduces main-thread blocking time when viewing large images in the lightbox, improving responsiveness.
🔬 Measurement: Verify by opening a large image in the lightbox using Chrome DevTools Performance tab and observing reduced "Image Decode" time on the main thread.

Co-authored-by: ImChong <74563097+ImChong@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@ImChong ImChong merged commit 2feb419 into main May 31, 2026
1 check passed
@ImChong ImChong deleted the bolt/lightbox-async-decode-11312640668267203817 branch May 31, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant