Skip to content

[styles] My app have memory leak on browser after using material-ui. #21528

@qhxin

Description

@qhxin
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

My APP has memory leak on Firefox, after using material-ui.

Expected Behavior 🤔

My APP must render very frequently by our realtime data.

Steps to Reproduce 🕹

Steps:

  1. use makeStyles to create useStyles hook;
  2. use useStyles hook in components.
  3. re calculate components frequently.
  4. memory is rising.

Context 🔦

https://codesandbox.io/s/inspiring-waterfall-e197h?file=/src/App.js
codesandbox.io/s/dazzling-visvesvaraya-eczqe?file=/src/Tab.js

Your Environment 🌎

Edit @eps1lon: Added codesandbox.io/s/dazzling-visvesvaraya-eczqe?file=/src/Tab.js as repro.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancescope: stylesSpecific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.v4.x

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions