fixing-motion-performance

Diagnose and fix CSS/JS animation performance issues causing stutter and jank.

6|Updated Mar 24, 2019
One-click install
npx skills add https://github.com/rafifos/dotfiles --skill fixing-motion-performance-rafifos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fixing-motion-performance
Source: https://github.com/rafifos/dotfiles/tree/main/dot_agents/skills/fixing-motion-performance
Command: npx skills add https://github.com/rafifos/dotfiles --skill fixing-motion-performance-rafifos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Audit and fix animation performance issues that cause layout thrashing, stutter, or jank in user interfaces by diagnosing and applying fixes to transforms, opacity, and paint operations.

Core Features & Use Cases

  • Diagnose layout thrashing, excessive paints, and scroll-linked motion.
  • Apply compositor-friendly techniques, prioritizing transform/opacity for motion.
  • Use cases include smooth page scrolling, responsive transitions, and blur-heavy effects.

Quick Start

Analyze the current UI animation work and implement fixes to improve frame rate.

Frequently Asked Questions about fixing-motion-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix animation stutter and jank in my web UI?

Fix animation stutter by diagnosing layout thrashing and excessive paints, then applying compositor-friendly techniques that prioritize transforms and opacity for smooth motion.

What causes layout thrashing in JavaScript animations and how do I prevent it?

Layout thrashing occurs when JavaScript interleaves DOM measurements and writes, forcing synchronous recalculations. Prevent it by batching all measurements before applying any style writes.

Why does scrolling feel janky when using blur effects in CSS?

Scroll-linked jank with blur happens because heavy paint operations overwhelm the browser. Fix this by auditing paint regions and ensuring motion relies on compositor-friendly properties.

What is the best way to optimize CSS transitions for high frame rates?

Optimize CSS transitions by prioritizing transform and opacity properties to keep animations off the main thread, avoiding expensive layout recalculations and paints.

Can I use this approach to fix scroll-linked motion performance issues?

Yes, you can fix scroll-linked motion by diagnosing scroll handlers for layout thrashing and migrating animations to compositor-friendly transforms to eliminate UI jank.

Do I need specific libraries to improve frontend animation performance?

No specific libraries are required. Improving frontend animation performance relies on auditing native CSS and JavaScript animations to avoid heavy paints and layout thrashing.