[styles] My app have memory leak on browser after using material-ui.
See original GitHub issue- 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:
- use
makeStyles
to createuseStyles
hook; - use
useStyles
hook in components. - re calculate components frequently.
- 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.
Issue Analytics
- State:
- Created 3 years ago
- Comments:40 (19 by maintainers)
Top Results From Across the Web
[styles] My app have memory leak on browser after ... - GitHub
My APP has memory leak on Firefox, after using material-ui. Expected Behavior. My APP must render very frequently by our realtime data. Steps ......
Read more >Understanding Memory Leak from Material UI Table and Modal
Show activity on this post. I've got two files in my React app where I believe there is a memory leak occurring in...
Read more >How to Detect and Fix Memory Leaks With Chrome DevTools
Identify JS Heap Memory Leaks · Open DevTools · Go to the Memory panel. · select the “Allocation instrumentation on timeline” radio button....
Read more >Manage your app's memory - Android Developers
The Memory Profiler in Android Studio helps you find and diagnose memory issues in the following ways: See how your app allocates memory...
Read more >Fixing memory leaks in web applications | Read the Tea Leaves
But it's extremely unlikely to leak memory on the client side, since the browser will clear the memory every time you navigate between...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
An update, this issue is being resolved in v5 thanks to #22342 and the new
@material-ui/styled-engine
package.I can reproduce the memory leak but I believe this is a jss issue.
Edit: This might be a duplicate of #21143