Skip to content

@remotion/studio: Optimize performance when resizing window#6851

Merged
JonnyBurger merged 1 commit intomainfrom
studio-breakpoint
Mar 17, 2026
Merged

@remotion/studio: Optimize performance when resizing window#6851
JonnyBurger merged 1 commit intomainfrom
studio-breakpoint

Conversation

@JonnyBurger
Copy link
Copy Markdown
Member

No description provided.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment Mar 17, 2026 10:48am
remotion Ready Ready Preview, Comment Mar 17, 2026 10:48am

Request Review

Copy link
Copy Markdown
Contributor

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The optimizations look good and address the performance issue appropriately:

  1. Timeline.tsx and TopPanel.tsx: Adding React.memo wrappers prevents unnecessary re-renders when parent components re-render. The props passed to these components are stable (refs, memoized callbacks, or constants), so the memoization will be effective.

  2. use-breakpoint.ts: Using a ref to track the current breakpoint value and only calling setCompactUI when the value actually changes prevents redundant state updates during rapid resize events. This is a solid optimization.

The code follows React best practices and is consistent with patterns used elsewhere in the codebase. No issues found.

Pullfrog  | View workflow runpullfrog.com𝕏

@JonnyBurger JonnyBurger merged commit 422d1d0 into main Mar 17, 2026
15 checks passed
@JonnyBurger JonnyBurger deleted the studio-breakpoint branch March 17, 2026 11:44
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