Skip to content

Conversation

@eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Nov 12, 2025

Resize is closer to scroll events which are already batched during a frame. We previously flushed state updates from resize events when new discrete events came in. Now resize is batched with other continuous events.

We stil flush before the next frame is painted.

@meta-cla meta-cla bot added the CLA Signed label Nov 12, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Nov 12, 2025
@react-sizebot
Copy link

Comparing: 1ea46df...2ffe311

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 608.16 kB 608.16 kB = 107.64 kB 107.65 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 666.18 kB 666.18 kB = 117.35 kB 117.35 kB
facebook-www/ReactDOM-prod.classic.js = 693.31 kB 693.31 kB = 121.97 kB 121.98 kB
facebook-www/ReactDOM-prod.modern.js = 683.73 kB 683.73 kB = 120.36 kB 120.36 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 2ffe311

@eps1lon eps1lon marked this pull request as ready for review November 12, 2025 11:08
@eps1lon eps1lon merged commit 093b324 into facebook:main Nov 13, 2025
247 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 13, 2025
github-actions bot pushed a commit that referenced this pull request Nov 13, 2025
@Samdevelop25
Copy link

This PR introduces a small but meaningful performance optimization by batching resize updates until the next animation frame, reducing unnecessary render cycles and improving layout stability during continuous resizing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants