Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance in transitions #3912

Closed
tomascharad opened this issue Apr 8, 2016 · 6 comments
Closed

Performance in transitions #3912

tomascharad opened this issue Apr 8, 2016 · 6 comments
Labels
duplicate This issue or pull request already exists

Comments

@tomascharad
Copy link

Problem Description

Hi guys,

I have been having performance issues that might be related to transition.js dependencies of material-ui.
I have a medium size SPA using redux.
I believe that one of the most CPU consuming process of my app are the ones related with material-ui components.
I don't know if this is a fixable issue, but I'm attaching a snapshot of my chrome cpu profile.
Snapshot

Versions

  • Material-UI: "material-ui": "^0.15.0-alpha.2"
  • React: "react": "^0.14.8"
  • Browser: Chrome Version 49.0.2623.110 (64-bit)
@appetizermonster
Copy link

I found a hacky way to improve performance if you don't need an css autoprefixer.
You just provide a muiTheme that has an property userAgent: false, then transition wouldn't be called.
See this code

e.g.

const muiTheme = getMuiTheme({
  userAgent: false
});

...
render() {
  <MuiThemeProvider muiTheme={muiTheme}>
    ...
  </MuiThemeProvider>
}
...

@nathanmarks
Copy link
Member

@appetizermonster thanks appetizer -- we have several issues open that are related to performance and styling. This is going to be addressed soon.

@nathanmarks nathanmarks added the duplicate This issue or pull request already exists label Apr 11, 2016
@tomascharad
Copy link
Author

Hi @appetizermonster, thanks for the hack, I'll dig into it.
@nathanmarks which issue is the duplicated one so I can track it? #42 ?

@nathanmarks
Copy link
Member

@tomascharad some of these are related: https://github.com/callemall/material-ui/issues?q=is%3Aopen+is%3Aissue+label%3APerformance

Lots of the performance issues come down to recalculating styles and re-renders.

Style related perf issues are a goal to fix in 0.16.0 -- a big one at that.

@nathanmarks
Copy link
Member

@tomascharad I don't see a specific issue for all of it, the styles issue is scattered around other issues (including perf) -- but we will have an umbrella styles issue that covers it all.

@tomascharad
Copy link
Author

Many thanks for the information @nathanmarks .
I'll be alert on the performance tag then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants