mui / mui/material-ui

[Checkbox] Slows down the render of the page

Open
#36,186 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance scope: checkbox
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Steps to reproduce 🕹

I have a long list of people (1000)
Each of them has a checkbox status attach to every user
I did notice when I use HTML checkbox instead of MUI one, the page renders about 3 to 5 times faster

The issue only occurs when I'm dealing with a long list of players, it does not affect a short list of players,
at least from the visible standpoint

Repository with live reproduction:
https://github.com/alexander-vashchuk/react-slow-render

Current behavior 😯

Checkbox takes a while to update the page

Expected behavior 🤔

Checkbox works immediately

Context 🔦

Demo:
animation

I would like any help on this one, I might be doing something stupid from the React optimization standpoint, so I'd appreciate any advice

Your environment 🌎
  System:
    OS: Windows 10 10.0.19044
  Binaries:
    Node: 16.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\.yarn\bin\yarn.CMD
    npm: 8.5.5 - C:\Program Files\nodejs\npm.CMD
    browser: Google Chrome
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.19041.1266.0), Chromium (110.0.1587.41)
  npmPackages:
    @emotion/react: ^11.10.5 => 11.10.5
    @emotion/styled: ^11.10.5 => 11.10.5
    @mui/base:  5.0.0-alpha.108
    @mui/core-downloads-tracker:  5.10.16
    @mui/material: ^5.10.16 => 5.10.16
    @mui/private-theming:  5.10.16
    @mui/styled-engine:  5.10.16
    @mui/system:  5.10.16
    @mui/types:  7.2.2
    @mui/utils:  5.10.16
    @types/react: 18.0.25 => 18.0.25
    react: 18.2.0 => 18.2.0
    react-dom: 18.2.0 => 18.2.0
    typescript: 4.9.3 => 4.9.3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the linked react-slow-render repository as the reproduction and compare the MUI Checkbox with the native HTML checkbox in the 1,000-player list. Profile the Checkbox update path first; done means the long list updates promptly without the reported 3–5× slowdown, with behavior preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.