Token导航 LogoToken导航

Agent Skill · 研究检索

remotion-performance-optimizer(Remotion performance 优化器)

用于辅助视频生成、动画合成、脚本化剪辑或 Remotion 等视频项目开发。它适合让 Agent 组织镜头、生成素材说明、维护合成代码或排查渲染问题。使用时需要确认分辨率、时长、素材路径和导出格式;涉及外部素材、人物肖像或商业发布时,应先核对版权授权和内容审核要求。

remotion-performance-optimizer 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 36,895。

总安装 1,839周安装 79GitHub Stars 18下载 645核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:remotion-performance-optimizer(Remotion performance 优化器)
来源仓库:https://github.com/ncklrs/startup-os-skills
仓库路径:skills/remotion-performance-optimizer
安装命令:
npx skills add https://github.com/ncklrs/startup-os-skills --skill remotion-performance-optimizer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ncklrs/startup-os-skills --skill remotion-performance-optimizer

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于优化 Remotion 视频项目的性能表现,提升渲染效率与资源管理。适合在视频生成、动画合成或脚本化剪辑项目中组织镜头结构、排查渲染瓶颈。通过 GitHub 安装后,可在 Codex、Claude、Cursor 等宿主中调用相关命令进行配置与调优。

使用时需确认项目分辨率、时长及素材路径;涉及外部素材或商业用途时注意版权合规。建议结合具体项目需求测试性能参数,避免在生产环境中直接覆盖原始文件。

来源仓库内路径:skills/remotion-performance-optimizer

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/ncklrs/startup-os-skills --skill remotion-perf…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

remotion-performance-optimizer 怎么安装?

在终端执行 npx skills add https://github.com/ncklrs/startup-os-skills --skill remotion-performance-op…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

remotion-performance-optimizer 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

remotion-performance-optimizer 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

remotion-performance-optimizer 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

remotion-performance-optimizer 用的人多吗?

公开数据是累计安装 1,839 次,近一周安装 79 次,下载 645 次,GitHub 18 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

remotion-performance-optimizer 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
remotion-performance-optimizer

Remotion performance 优化器 · 本页

1,83918操作浏览器未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Remotion Performance Optimizer

Comprehensive performance analysis and optimization recommendations for Remotion video compositions. Identifies bottlenecks and provides actionable fixes to reduce render times.

What This Skill Does

Performs deep performance analysis:

  1. Computation analysis — Identify expensive operations in render path
  2. Re-render detection — Find unnecessary component re-renders
  3. Asset optimization — Recommend asset size and format improvements
  4. Memoization opportunities — Identify cacheable calculations
  5. Architecture review — Suggest structural improvements
  6. Render profiling — Analyze frame render times

Input/Output Formats

Input Format: Remotion Composition Code

Accepts implemented Remotion composition files:

Files to analyze:

src/remotion/compositions/VideoName/
├── index.tsx           # Main composition
├── constants.ts        # Color, timing, spring configs
├── types.ts            # TypeScript types
└── scenes/
    ├── Scene1.tsx
    ├── Scene2.tsx
    └── Scene3.tsx

Context needed:

  • Target render time goals (e.g., < 100ms/frame)
  • Composition complexity (simple, moderate, complex)
  • Any specific performance concerns

Example request:

Analyze performance of VideoName composition.
Target: < 100ms/frame average render time.
Scene 2 is rendering slowly (200ms/frame).

Output Format: OPTIMIZATION_REPORT.md

Generates detailed performance analysis with actionable fixes:

# Performance Optimization Report: [Video Title]

**Date:** 2026-01-23
**Analyzer:** remotion-performance-optimizer
**Composition:** `src/remotion/compositions/VideoName/`

---

## Executive Summary

**Current Performance:** ⚠️ NEEDS OPTIMIZATION

| Metric | Current | Target | Status |
|--------|---------|--------|--------|
| **Average Render Time** | 145ms/frame | < 100ms | 🔴 45% over target |
| **Slowest Scene** | Scene 2: 285ms | < 150ms | 🔴 90% over target |
| **Total Render Time (estimated)** | 36 minutes | < 20 minutes | 🔴 80% over target |
| **Memory Usage** | Normal | Normal | 🟢 Good |

**Potential Improvement:** 60-70% faster render times after implementing recommendations

**Priority Actions:**
1. Replace Math.random() with seeded random in Scene 2 (55% improvement)
2. Optimize large product image (20% faster asset loading)
3. Extract repeated spring calculations (15% improvement)

---

## Performance Breakdown by Scene

| Scene | Avg Render Time | Status | Primary Bottleneck |
|-------|----------------|--------|-------------------|
| Scene 1 | 75ms | 🟢 Good | None |
| Scene 2 | 285ms | 🔴 Critical | Non-deterministic particle system |
| Scene 3 | 95ms | 🟡 Acceptable | Large asset loading |
| Scene 4 | 80ms | 🟢 Good | None |

**Overall:** 145ms average (Target: < 100ms)

---

## Issues Found

### CRITICAL (Major Performance Impact)

#### 1. Non-Deterministic Particle System in Scene 2
**Impact:** 🔴 200ms per frame slowdown
**Location:** `src/remotion/compositions/VideoName/scenes/Scene2.tsx:48-65`
**Severity:** Critical - 70% of render time in Scene 2

**Problem:**

// ❌ PROBLEM: Math.random() called 70 times per frame {Array.from({ length: 70 }, (_, i) => { const x = Math.random() * width; // Recalculated every frame! const y = Math.random() * height; // Non-deterministic const speed = Math.random() * 2;

return <Particle key={i} x={x} y={y} speed={speed} />; })}


**Why This Is Slow:**

- Math.random() is non-deterministic (different each frame)
- 70 particles × 3 random calls = 210 random calls per frame
- Remotion can't cache because values change
- Browser must recalculate positions every frame

**Solution:**

// ✅ OPTIMIZED: Seeded random, deterministic const seededRandom = (seed: number): number => { const x = Math.sin(seed) * 10000; return x - Math.floor(x); };

const particles = useMemo( () => Array.from({ length: 70 }, (_, i) => ({ x: seededRandom(i * 123.456) * width, y: seededRandom(i * 789.012) * height, speed: seededRandom(i * 456.789) * 2, })), [width, height] );

{particles.map((p, i) => ( <Particle key={i} x={p.x} y={p.y} speed={p.speed} /> ))}


**Expected Improvement:**

- Scene 2: 285ms → 125ms (55% faster)
- Overall: 145ms → 105ms (28% faster)
- Total render time: 36min → 22min (40% faster)

**Implementation Time:** 15 minutes

---

### HIGH (Significant Performance Impact)

#### 2. Large Unoptimized Product Image

**Impact:** 🟡 50ms asset loading delay **Location:** `public/images/product.png` **Severity:** High - Affects loading and memory

**Problem:**

Current Asset:

  • Format: PNG (unnecessary transparency)
  • Resolution: 4000x3000 (2x larger than needed)
  • File Size: 8.2MB
  • Load Time: ~50ms

**Why This Is Slow:**

- 8.2MB file takes time to load and decode
- 4000x3000 is overkill for 1920x1080 display
- PNG format unnecessary (no transparency used)

**Solution:**

Resize and convert to JPEG

magick public/images/product.png \ -resize 1920x1440 \ -quality 90 \ public/images/product.jpg

Update code

<Img src={staticFile('images/product.jpg')} />


**Result:**

Optimized Asset:

  • Format: JPEG
  • Resolution: 1920x1440 (2x for retina)
  • File Size: ~400KB (95% smaller)
  • Load Time: ~5ms (90% faster)

**Expected Improvement:**

- Scene 3 load time: 50ms faster
- Overall render: 95ms → 85ms in Scene 3
- Smaller final video file

**Implementation Time:** 5 minutes

---

#### 3. Repeated Spring Calculations

**Impact:** 🟡 30ms per scene **Location:** Multiple scenes **Severity:** High - Accumulates across scenes

**Problem in Scene 1:**

// ❌ PROBLEM: Spring calculated 3 times <div style={{ opacity: spring({ frame, fps, config: SMOOTH }), scale: spring({ frame, fps, config: SMOOTH }), y: interpolate(spring({ frame, fps, config: SMOOTH }), [0, 1], [0, 100]), }} />


**Why This Is Slow:**

- Spring function has internal calculations
- Called 3 times with identical parameters
- Remotion can't optimize duplicate calls
- Wastes 20-30ms per scene

**Solution:**

// ✅ OPTIMIZED: Calculate once, reuse const progress = spring({ frame, fps, config: SMOOTH });

<div style={{ opacity: progress, scale: progress, y: interpolate(progress, [0, 1], [0, 100]), }} />


**Expected Improvement:**

- Per scene: 20-30ms faster
- Overall: 145ms → 125ms (15% faster)
- Affects Scenes 1, 3, 4

**Implementation Time:** 10 minutes

---

### MEDIUM (Moderate Performance Impact)

#### 4. Component Not Memoized

**Impact:** 🟡 10-15ms **Location:** Scene components **Severity:** Medium - Minor unnecessary re-renders

**Problem:**

// Scene components re-render even when props haven't changed function Scene1() { ... } function Scene2() { ... }


**Solution:**

import { memo } from 'react';

const Scene1 = memo(() => { ... }); const Scene2 = memo(() => { ... });


**Expected Improvement:**

- 10-15ms per scene
- Overall: 10% faster in complex compositions

**Implementation Time:** 5 minutes

---

### LOW (Minor Performance Impact)

#### 5. Array Creation in Render

**Impact:** 🟢 2-5ms **Location:** `Scene4.tsx:23` **Severity:** Low - Negligible but fixable

**Problem:**

// Array recreated every frame {Array(50).fill(0).map((_, i) => <Element key={i} />)}


**Solution:**

// Reuse array reference const ELEMENTS = Array.from({ length: 50 }, (_, i) => i);

{ELEMENTS.map((i) => <Element key={i} />)}


**Expected Improvement:** 2-5ms (minimal but good practice)

**Implementation Time:** 2 minutes

---

## Optimization Implementation Plan

### Phase 1: Critical Fixes (15 minutes) — 55% improvement

1. Replace Math.random() with seeded random in Scene 2
  - Expected: 285ms → 125ms

### Phase 2: High Priority (15 minutes) — 20% additional improvement

1. Optimize product.png to JPEG (5 min)
  - Expected: 95ms → 85ms in Scene 3
2. Extract spring calculations (10 min)
  - Expected: 145ms → 125ms overall

### Phase 3: Medium Priority (10 minutes) — 10% additional improvement

1. Memoize scene components
  - Expected: 10-15ms improvement

### Phase 4: Low Priority (5 minutes) — 2-5% improvement

1. Extract array constants
  - Expected: 2-5ms improvement

**Total Implementation Time:** 45 minutes **Total Expected Improvement:** 60-70% faster renders

---

## Before/After Projections

| Metric | Before | After Phase 1 | After Phase 2 | After All | Target |
| --- | --- | --- | --- | --- | --- |
| Scene 2 | 285ms | 125ms | 115ms | 110ms | < 150ms ✅ |
| Scene 3 | 95ms | 95ms | 85ms | 80ms | < 100ms ✅ |
| Overall Avg | 145ms | 105ms | 90ms | 85ms | < 100ms ✅ |
| Total Render | 36min | 22min | 19min | 18min | < 20min ✅ |

**After all optimizations:** All targets met! 🎉

---

## Performance Validation

### Benchmarking Commands

Test single frame render time

npx remotion still src/index.tsx VideoName --frame=150

Profile specific scene (Scene 2)

npx remotion still src/index.tsx VideoName --frame=225

Benchmark full render (first 100 frames)

time npx remotion render src/index.tsx VideoName test.mp4 --frames=0-100

Full production render with timing

time npx remotion render src/index.tsx VideoName output.mp4


### Performance Targets

| Composition Type | Target | Current | Status |
| --- | --- | --- | --- |
| Simple scenes | < 50ms | 75ms (Scenes 1,4) | 🟡 Acceptable |
| Moderate scenes | < 100ms | 145ms avg | 🔴 Over target |
| Complex scenes | < 150ms | 285ms (Scene 2) | 🔴 Over target |

**After optimizations:** All scenes should meet targets

---

## Code Quality Checks

✅ **Good Patterns Found:**

- Constants extracted (COLORS, SPRING_CONFIGS)
- useVideoConfig used for responsive sizing
- TypeScript types defined
- staticFile() used for assets

⚠️ **Optimization Opportunities:**

- Replace Math.random() with seeded random
- Extract repeated spring calculations
- Memoize scene components
- Optimize large assets

---

## Asset Optimization Details

### Current Assets

| Asset | Size | Format | Status | Recommendation |
| --- | --- | --- | --- | --- |
| logo.png | 180KB | PNG | 🟢 Good | Keep as-is |
| product.png | 8.2MB | PNG | 🔴 Optimize | → JPEG 400KB |
| background.mp3 | 1.8MB | MP3 | 🟢 Good | Keep as-is |
| whoosh.mp3 | 45KB | MP3 | 🟢 Good | Keep as-is |

### Optimization Commands

Product image (95% size reduction)

magick public/images/product.png \ -resize 1920x1440 \ -quality 90 \ public/images/product.jpg


---

## Recommendations Summary

### Immediate Actions (Critical)

1. ✅ **Replace Math.random() in Scene 2** — 55% faster
  - Priority: CRITICAL
  - Time: 15 minutes
  - Impact: 160ms per frame improvement

### Short-Term Actions (High Priority)

1. ✅ **Optimize product image** — 20% faster loading
  - Priority: HIGH
  - Time: 5 minutes
  - Impact: 50ms improvement
2. ✅ **Extract spring calculations** — 15% faster
  - Priority: HIGH
  - Time: 10 minutes
  - Impact: 20-30ms per scene

### Long-Term Improvements (Medium/Low)

1. Memoize scene components (10% improvement)
2. Extract array constants (2-5% improvement)
3. Consider lazy loading assets
4. Profile with Chrome DevTools for deeper analysis

---

## Next Steps

1. **Implement Critical Fix:** Replace Math.random() (highest impact)
2. **Benchmark:** Verify Scene 2 improvement (should be 285ms → 125ms)
3. **Implement High Priority:** Optimize assets and springs
4. **Re-run analysis:** Verify all targets met
5. **Final render:** Generate production video with optimizations

---

## Tools & Resources

### Profiling Tools

Remotion built-in profiling

npx remotion preview --log=verbose

Chrome DevTools profiling

Open preview → DevTools → Performance tab → Record


### Optimization References

- Remotion Performance Docs: [https://remotion.dev/docs/performance](https://remotion.dev/docs/performance)
- React Profiler: [https://react.dev/reference/react/Profiler](https://react.dev/reference/react/Profiler)
- Seeded Random Pattern: See `/remotion-component-builder` skill

---

## Approval

**Status:** ⚠️ OPTIMIZATION REQUIRED BEFORE PRODUCTION

After implementing critical and high-priority fixes, this composition will meet all performance targets and be production-ready.

**Estimated Time to Production-Ready:** 30-45 minutes of optimization work

**Signed:** remotion-performance-optimizer **Date:** 2026-01-23

This document provides:

  • Current vs. target performance metrics
  • Prioritized issues by impact (CRITICAL, HIGH, MEDIUM, LOW)
  • Before/after projections with concrete numbers
  • Specific code locations and fixes
  • Implementation time estimates
  • Step-by-step optimization plan
  • Benchmarking commands for validation
  • Asset optimization recommendations

Feeds into:

  • Developer: Implement fixes
  • Re-run /remotion-video-reviewer after optimizations
  • Final production render

Performance Analysis Categories

1. Expensive Computations

Issue: Calculations executed every frame unnecessarily.

Detection:

// ❌ PROBLEM - Recalculated every frame
function Scene() {
  const frame = useCurrentFrame();

  // Heavy calculation every frame
  const particles = Array.from({ length: 1000 }, () => ({
    x: Math.random() * 1920,
    y: Math.random() * 1080,
  }));

  return /* render particles */;
}

Solution:

// ✓ OPTIMIZED - Deterministic, seeded
function Scene() {
  const frame = useCurrentFrame();

  // Deterministic calculation
  const particles = useMemo(
    () => Array.from({ length: 1000 }, (_, i) => ({
      x: seededRandom(i * 123) * 1920,
      y: seededRandom(i * 456) * 1080,
    })),
    [] // No dependencies, calculate once
  );

  return /* render particles */;
}

// Seeded random for consistency
const seededRandom = (seed: number) => {
  const x = Math.sin(seed) * 10000;
  return x - Math.floor(x);
};

Impact: 30-50% render time reduction for scenes with many elements.

2. Repeated Spring Calculations

Issue: Same spring calculation multiple times.

Detection:

// ❌ PROBLEM - Spring calculated 3 times
<div style={{
  opacity: spring({ frame, fps, config: SMOOTH }),
  scale: spring({ frame, fps, config: SMOOTH }),
  y: interpolate(spring({ frame, fps, config: SMOOTH }), [0, 1], [0, 100]),
}} />

Solution:

// ✓ OPTIMIZED - Calculate once, reuse
const progress = spring({ frame, fps, config: SMOOTH });

<div style={{
  opacity: progress,
  scale: progress,
  y: interpolate(progress, [0, 1], [0, 100]),
}} />

Impact: 10-20% render time reduction per scene.

3. Large Asset Sizes

Issue: Unoptimized assets slow down loading and rendering.

Detection:

Product image: 4000x3000 PNG (8.2MB)
Background video: 3840x2160 ProRes (450MB)
Logo: 2000x2000 PNG (1.5MB)

Recommendations:

✓ Product image: 1920x1440 JPEG 90% (400KB) — 95% smaller
✓ Background video: 1920x1080 H.264 (25MB) — 95% smaller
✓ Logo: 800x800 PNG optimized (80KB) — 95% smaller

Impact: Faster renders, smaller output files, better preview performance.

4. Unnecessary Re-renders

Issue: Components re-render when dependencies haven't changed.

Detection:

// ❌ PROBLEM - Re-renders on every frame change
function ExpensiveComponent({ data }) {
  // Heavy calculation
  const processed = data.map(item => /* complex transform */);

  return /* render */;
}

// Parent re-renders every frame
<ExpensiveComponent data={staticData} />

Solution:

// ✓ OPTIMIZED - Memoized component
const ExpensiveComponent = memo(({ data }) => {
  // Heavy calculation
  const processed = useMemo(
    () => data.map(item => /* complex transform */),
    [data]
  );

  return /* render */;
});

// Or: Extract static data outside component
const processedData = staticData.map(item => /* complex transform */);

function Scene() {
  return <Component data={processedData} />;
}

Impact: 20-40% render time reduction for complex components.

5. DOM Thrashing

Issue: Excessive DOM reads/writes causing layout thrashing.

Detection:

// ❌ PROBLEM - Reading and writing in loop
elements.forEach((el) => {
  const width = el.getBoundingClientRect().width; // Read
  el.style.width = `${width * 2}px`; // Write (causes reflow)
});

Solution:

// ✓ OPTIMIZED - Batch reads, then batch writes
const widths = elements.map((el) => el.getBoundingClientRect().width);
elements.forEach((el, i) => {
  el.style.width = `${widths[i] * 2}px`;
});

Impact: 15-30% improvement in DOM-heavy scenes.

6. Unoptimized Loops

Issue: Inefficient iteration patterns.

Detection:

// ❌ PROBLEM - Array creation every frame
{Array(100).fill(0).map((_, i) => (
  <Particle key={i} index={i} />
))}

Solution:

// ✓ OPTIMIZED - Reuse array reference
const PARTICLES = Array.from({ length: 100 }, (_, i) => i);

{PARTICLES.map((i) => (
  <Particle key={i} index={i} />
))}

Impact: 5-10% improvement in scenes with many elements.

Performance Optimization Checklist

Computation Optimizations

  • No Math.random() in render (use seeded random)
  • Heavy calculations use useMemo
  • Spring calculations extracted and reused
  • Static data moved outside components
  • Loops use Array.from instead of Array().fill()

Component Optimizations

  • Expensive components wrapped in memo()
  • useMemo for derived state
  • useCallback for event handlers passed to children
  • Components split appropriately (not too large)

Asset Optimizations

  • Images sized to actual display dimensions (2x for retina)
  • JPEG for photos, PNG for transparency, SVG for graphics
  • Videos use H.264 codec with reasonable bitrate
  • Audio files trimmed to exact duration
  • Fonts load only required weights

Render Optimizations

  • Avoid inline object/array creation in JSX
  • Use key prop correctly in lists
  • Minimize div nesting depth
  • Use CSS transforms over position changes
  • AbsoluteFill instead of complex layouts

Architecture Optimizations

  • Extract reusable components
  • Scene components under 200 lines
  • Constants extracted to top of file
  • Utility functions outside components
  • Logical component composition

Performance Benchmarking

Measuring Render Time

# Benchmark a specific frame
npx remotion still src/index.tsx VideoName --frame=100

# Benchmark full render (first 100 frames)
time npx remotion render src/index.tsx VideoName output.mp4 --frames=0-100

# Profile with Chrome DevTools
npx remotion preview
# Open Chrome DevTools → Performance tab → Record

Performance Targets

Composition TypeTarget Render TimeNotes
Simple (text, shapes)< 50ms/frameMinimal computations
Moderate (animations, images)50-100ms/frameStandard videos
Complex (particles, 3D)100-200ms/frameHeavy effects
Very Complex (thousands of elements)200-500ms/frameAcceptable with optimization

Red flags:

  • Single frame > 500ms → Major optimization needed
  • Render time increases over time → Memory leak

Common Bottleneck Patterns

Pattern 1: Particle Explosion

Issue:

// 1000 particles, each calculating independently
{Array(1000).fill(0).map((_, i) => {
  const x = Math.random() * width;  // Recalculated every frame!
  const y = Math.random() * height;
  return <Particle key={i} x={x} y={y} />;
})}

Fix:

// Deterministic particles, calculated once
const particles = useMemo(
  () => Array.from({ length: 1000 }, (_, i) => ({
    x: seededRandom(i * 123.456) * width,
    y: seededRandom(i * 789.012) * height,
  })),
  [width, height]
);

{particles.map((p, i) => (
  <Particle key={i} x={p.x} y={p.y} />
))}

Pattern 2: Text Processing

Issue:

// String operations every frame
const words = text.split(' ');
const processed = words.map(w => w.toUpperCase());

Fix:

// Process once outside render
const processedWords = useMemo(
  () => text.split(' ').map(w => w.toUpperCase()),
  [text]
);

Pattern 3: Conditional Rendering

Issue:

// Component always rendered, visibility toggled
<HeavyComponent style={{ opacity: frame > 100 ? 1 : 0 }} />

Fix:

// Don't render at all when not visible
{frame > 100 && <HeavyComponent />}

Optimization Report Template

## Performance Optimization Report

### Current Performance
- Average render time: 180ms/frame
- Slowest scene: Scene 3 (350ms/frame)
- Total video render time: 45 minutes (estimated)

### Identified Issues

**CRITICAL (Major Impact)**
1. Particle system using Math.random()
   - Location: Scene 2, ParticleSystem component
   - Impact: +200ms per frame
   - Fix: Replace with seeded random
   - Estimated improvement: 55% faster

2. 4K product image not optimized
   - Location: Scene 4
   - Current: 8.2MB PNG
   - Impact: Slow loading, memory pressure
   - Fix: Resize to 1920x1440, convert to JPEG
   - Estimated improvement: 95% smaller file

**HIGH (Significant Impact)**
1. Repeated spring calculations
   - Location: Scene 1, Scene 3, Scene 5
   - Impact: +50ms per scene
   - Fix: Extract to progress variable
   - Estimated improvement: 20% faster

**MEDIUM (Moderate Impact)**
1. Components not memoized
   - Location: Scene components
   - Fix: Wrap in React.memo()
   - Estimated improvement: 10% faster

### Optimization Plan

1. Implement seeded random (15 min) — 55% improvement
2. Optimize assets (30 min) — Better loading
3. Extract spring calculations (10 min) — 20% improvement
4. Memoize components (20 min) — 10% improvement

**Expected Result:**
- Render time: 180ms → 80ms per frame (55% faster)
- Total render: 45 min → 20 min

Integration with Other Skills

Works with:

  • /remotion-video-reviewer — Performance audit during review
  • /remotion-best-practices — Ensures optimized patterns
  • /remotion-spec-translator — Generates optimized code from start

Rules Directory

Detailed optimization guides:


This skill ensures Remotion videos render as fast as possible while maintaining quality.

平台分布

Claude

32.31%
按下载量换算208

Codex

31.44%
按下载量换算203

Cursor

17.15%
按下载量换算111

Gemini CLI

10.05%
按下载量换算65

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills