@zodern I believe this would be a nice case for you to investigate.
I did a quick profile here and it seems they (mui) are somehow deferring the evaluating of modules, I didn’t check their code but in the profile I see the runSetters calls running later so I think they are using something to avoid importing all the modules in the first load.
It seems something started by insertStyles function.
I think this is the same issue as Unexpected module.runSetters wrapping · Issue #277 · benjamn/reify · GitHub. In the code there are parameters that have the same name as exports, and where the parameters are reassigned reify is unnecessarily calling runSetters. ~90% of the time is spent by runSetters, and quickly looking through the code I don’t see anywhere that it needs to be run.
Au contraire mon frere. I’m using Material v5 and it’s great. There’s a very small delay on the opening of the nav menu the first time which I never noticed before, and it will be nice to have it fixed.
It depends on the complexity of the app, but it’s more than just a small delay on one component. Every new component tree will add a delay, so every menu, every new route, every conditional element etc. Of course, it’s only for the first time, but users tend to refresh or close their browser from time to time
And it’s not just a delay. Browser freezes for 600ms in our app and if you have any animations, spinners for example, it’s very visible.
You know, I think you’re right. Is there a practice for measuring the browser freeze time, or do you tell just by observation? I think I’m seeing the same thing in my app.
I’m seeing load times in the performance profiler for many different things. Nothing seems to be labeled “mui” or “material”. Is there a way to find out, how much of the load time is related to material-ui?