material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Performance blocker after a version 1.62.0 of material-table

Open LuisPinaSoares opened this issue 6 years ago • 16 comments

Hi,

This is not an easy issue. I am using material-table extensively on my application. I was having serious performance issues, to the extend of having 3 tables loaded on the view and the performance after a few clicks just killed the browser.

Started trying to understand the issue. Still haven't fully isolated it but from what i have tested everything works well if i am using version 1.62.0 if i update to the latest version i have a serious memory leak on material-table appearing, from what i saw it as something to do with CSS calculation or something.

I haven't yet looked for the version where this behaviour starts happening nonetheless i can give you a glimpse of what appears in memory when it goes south, take a look at memory snapshot bellow, memory gets flooded with some CSS computation.

@mbrn if you think it is of any value i can try and see in which version it started happening. I can replicate the issue easily on my application, not sure if it is that easy in a simple code sandbox. Could be my error but i think not, i have been chasing this for a few days.

image

image

LuisPinaSoares avatar Oct 07 '20 22:10 LuisPinaSoares

Might be similar to #2514 but this is a temporary workaround until @mbrn or someone more familiar with the codebase is able to isolate the issue.

SamerAlsayegh avatar Oct 07 '20 23:10 SamerAlsayegh

Do you have any idea at which version started happening this issue, probably this would help to further isolate it. Thanks for the tip!

LuisPinaSoares avatar Oct 08 '20 09:10 LuisPinaSoares

Might be solved in https://github.com/mbrn/material-table/pull/2510 and seems to be not be an issue 1.68.1, but also there were other issues mentioned with bulk editing at those versions, so may not solve your issue completely.

SamerAlsayegh avatar Oct 08 '20 15:10 SamerAlsayegh

Not sure if it solved... because i confirmed this behaviour in the latest which was 1.69.1

LuisPinaSoares avatar Oct 08 '20 15:10 LuisPinaSoares

I too have been trying to chase down this behavior the past few days, can confirm that I arrived at exactly the same conclusion of some CSS calculation hanging. In my application the string calc to be evaluated was ~26MB

I am able to reliable reproduce the issue within my app, and I'll start on a sandbox which will hopefully demonstrate the behavior clearly.

(Same version, 1.69.1)

EDIT: Here is a sandbox which demonstrates the issue: https://codesandbox.io/s/intelligent-almeida-k05e0?file=/src/App.js

minelminel avatar Oct 14 '20 21:10 minelminel

Confirmed that the issue does not exist on 1.61.0

manubamba avatar Oct 18 '20 16:10 manubamba

I have a similar issue with 1.69.1 that is not present 1.62.0: When clicking on an action there's a huge spike on CPU load and my app freezes.

thisismydesign avatar Oct 20 '20 16:10 thisismydesign

From my brute force tests it seems that the bug was added on 1.69.0.

LuisPinaSoares avatar Oct 20 '20 21:10 LuisPinaSoares

Same issue, currently (1.69.1) only on a table I have external custom filters. Huge spike after switching quickly between filters. @SamerAlsayegh 's workaround helped for now. Any updates?

TimBenn avatar Nov 12 '20 20:11 TimBenn

Unfortunately mbrn is inactive and not merging PR's. Use the official community fork @material-table/core instead.

peacechen avatar Jan 08 '21 14:01 peacechen

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

stale[bot] avatar Apr 08 '21 18:04 stale[bot]

For me it's working again 1.69.2 with the last material-ui

skulljoi avatar Apr 08 '21 18:04 skulljoi

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

stale[bot] avatar Jul 07 '21 19:07 stale[bot]

Still relevant

thisismydesign avatar Jul 07 '21 20:07 thisismydesign

Check this fork of material-table https://www.npmjs.com/package/@material-table/core Its under active maintenance and already has this issue fixed.

LuisPinaSoares avatar Jul 08 '21 09:07 LuisPinaSoares

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

stale[bot] avatar Oct 07 '21 01:10 stale[bot]