MUI 5 speed issues - very slow - Meteor #29268
Replies: 16 comments 20 replies
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
-
I appreciate that. I'm not asking you to fix something that you can't see, however if this is a generalised issue that people are having with v5 then by getting our heads together we may to able to find some common causes. For that, we need to know how we can help the team get to the bottom of it.
The performance of my app is 5-10x slower since moving to Mui 5. It's the only change in my code base, so I'm pretty sure I can rule out React and the browser, and it seems reasonable to suspect the new styling engine is most likely the involved somehow. Off the top of my head I can think of any number of causes. Perhaps...
I am comfortable with these tools, but I can't find a way to profile just Mui to see where the bottle necks are. For info, if I use dev tools to profile the v4 version of my app on a route change, I get this: The same route change using v5: |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been minimized.
This comment has been minimized.
-
First off, I just wanted to say I really appreciate all the work from maintainers and contributors to Material UI - it's really been indispensable for me and my organization as of late! I just wanted to add my experience to the mix here as a form of validation - I'm experiencing pretty much exactly the same drastic slowdown as described above when doing a v4 -> v5 migration, and, like @alebrahimi, I'm using Meteor. @timothyarmes were you by any chance using Meteor on the project you experienced slowdown on? If so, that would make all 3 of the reported slowdowns in this thread Meteor-related, which would probably help quite a bit in nailing down the problem. Regardless, if I have any time in the next week or so, I'll try to see if I can reproduce this slowdown on a fresh CodeSandbox or something - even smaller components for me have a pretty intense load time, so I'm hoping that I'll be able to reproduce the issue on a fresh project. |
Beta Was this translation helpful? Give feedback.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
-
Hey guys. I can confirm that switching from MUI4 to MUI5 has a huge performance impact!I switched an entire app from MUI4 to MUI5, and I upgraded only the UI and didn't add any new features or refactoring. And I think the reason is simple.
You can check this But that's not all.During the application's lifetime, new stylesheets are added in the DOM for some reason, something that is not happening with MUI4. For instance, I have a big form with about 15 input fields. Note that only the Form component is re-rendered, not the entire application (double checked). Versions
These are my findings. Any help or workaround is highly appreciated. |
Beta Was this translation helpful? Give feedback.
-
The performance is quite terrible, and we have had users complaining more than usual since we migrated from v4 to v5. Things work well in our app made from As I investigated, I noticed significant delay each and every time a component would load. Seriously, 4 seconds to load an empty form is not acceptable! |
Beta Was this translation helpful? Give feedback.
-
Well, I'm glad I'm not the only one experiencing this drastic slow down :) Personally I'm now maintaining the production branch based on MUI 4 and a future branch based on MUI 5 in the hope that we get a solution, but there's no way I can use MUI 5 in production. Even with quite a few people investigating we don't appear to have found root cause, which is a bit worrying. It looks like Meteor is a common factor, but I can't imagine why that would have any affect whatsoever. I'm just using Meteor as the build engine, on the client there's a standard React instantiation that has nothing to do with Meteor at all really. I have no idea where to start looking. |
Beta Was this translation helpful? Give feedback.
-
@timothyarmes @yanickrochon @dennisat If you have a performance issue with meteor, I believe that the meteor team is fixing the issue. Here is their PR: meteor/meteor#11788 |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've just converted a fairly complex project from Material UI v4 to Mui v5. The initial conversion was fairly painless, about half a day, however removing all the makeStyles was painstaking work and I did it over a two week period.
Everything now works perfectly, however the site is now so much slower that it's practically unusable. For example, a route change that was maybe 0.5seconds before now takes about 5 seconds.
Is anyone else experiencing similar issues?
Can anyone suggest ways in which I can profile the rendering to see if there are now certain bottlenecks that I can improve?
Beta Was this translation helpful? Give feedback.
All reactions