Skip to content

⚡ bolt: [performance improvement]#29

Open
dttdrv wants to merge 1 commit into
mainfrom
bolt-scroll-progress-gpu-15132170364255815083
Open

⚡ bolt: [performance improvement]#29
dttdrv wants to merge 1 commit into
mainfrom
bolt-scroll-progress-gpu-15132170364255815083

Conversation

@dttdrv
Copy link
Copy Markdown
Owner

@dttdrv dttdrv commented Mar 28, 2026

💡 What: Replaced the CSS width transition and JS style.width updates on the .scroll-progress element with a transform: scaleX() approach.
🎯 Why: Animating the width property during a high-frequency event like scrolling forces the browser to recalculate the layout and repaint on every frame, which causes jank. By using transform: scaleX(), the animation is offloaded to the GPU compositor layer, skipping layout entirely.
📊 Impact: Reduces layout recalculations (thrashing) to zero for the progress bar during scrolling, resulting in smoother 60fps performance, especially on low-end devices.
🔬 Measurement: Verify by scrolling the page while recording a Performance profile in Chrome DevTools. Observe that "Recalculate Style" and "Layout" events caused by the progress bar update are no longer present.


PR created automatically by Jules for task 15132170364255815083 started by @dttdrv

Replaced the width animation on .scroll-progress with a GPU-accelerated transform: scaleX(0...1) to avoid layout thrashing during scroll events.
@google-labs-jules
Copy link
Copy Markdown

👋 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.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying personal-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: eb68d8a
Status: ✅  Deploy successful!
Preview URL: https://9ebeb842.personal-website-5ns.pages.dev
Branch Preview URL: https://bolt-scroll-progress-gpu-151.personal-website-5ns.pages.dev

View logs

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