Skip to content

Bug: React 19 significant performance regression with many <input> elements #36229

@elakov

Description

@elakov

After upgrading to React 19, I observed a significant performance regression during the commit phase. The slowdown occurs specifically when a render touches <input> elements.

The new updateInput logic in React 19 does not check whether the DOM actually needs to be updated. Instead of skipping unchanged inputs, it unconditionally applies property writes on every commit — even when the values have not changed.

On pages with a large number of <input> elements, this causes unnecessary DOM mutations that make updates significantly slower compared to React 18.

The problematic lines appear to be:


if (
name != null &&
typeof name !== 'function' &&
typeof name !== 'symbol' &&
typeof name !== 'boolean'
) {
if (__DEV__) {
checkAttributeStringCoercion(name, 'name');
}
node.name = toString(getToStringValue(name));
} else {
node.removeAttribute('name');
}
}

React version: 19.2.4

Steps To Reproduce

  1. Render a component containing a large number of <input> elements (e.g., 500+).
  2. Trigger a state update that changes the props of only one input.

Link to code example:
react 18 example: https://codesandbox.io/p/sandbox/dry-voice-g7ytpy
react 19 example: https://codesandbox.io/p/sandbox/dazzling-mirzakhani-5sdc8f

The current behavior

The update is significantly slower than in React 18.
React writes to the DOM for every <input> element, even those whose values have not changed.

The expected behavior

The update completes quickly.
React only writes to the DOM for the single input whose value actually changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions