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

[LinearProgress] VERY expensive (50% CPU usage for 1 instance) #4412

Closed
matthewoates opened this issue Jun 2, 2016 · 12 comments
Closed

[LinearProgress] VERY expensive (50% CPU usage for 1 instance) #4412

matthewoates opened this issue Jun 2, 2016 · 12 comments
Labels
component: avatar This is the name of the generic UI component, not the React module! component: LinearProgress The React component. component: progress This is the name of the generic UI component, not the React module! performance

Comments

@matthewoates
Copy link
Contributor

matthewoates commented Jun 2, 2016

Problem description

50% CPU usage on a new Retina MBP on the demo page with 2 progress indicators (only 1 of which is animating)
http://www.material-ui.com/#/components/linear-progress
screen shot 2016-06-02 at 1 07 55 am

By contrast, here's a page with 10 different active animations running and much lower CPU usage. (10%)
http://kyleamathews.github.io/react-spinkit/
screen shot 2016-06-02 at 1 09 32 am

The component looks great, but sadly In it's current state linear-progress is unusable.

Steps to reproduce

Visit http://www.material-ui.com/#/components/linear-progress and open the chrome task manager. (top right hamburger -> more tools -> task manager

Versions

  • Material-UI: latest demo
  • React:
  • Browser: Chrome 50
@nathanmarks
Copy link
Member

@matthewoates 13" By any chance? What is your CPU like when you do a google hangout w/ video?

@nathanmarks
Copy link
Member

@matthewoates (Not saying this isn't an issue -- just trying to gauge the level of impact relative to other apps I find make the retina MBPs without dedicated graphics go crazy)

@nathanmarks
Copy link
Member

Well, we aren't going to follow angular-material's technique either ;)

image

@nathanmarks
Copy link
Member

Or material design lite:

image

@nathanmarks
Copy link
Member

materializecss is even worse:

image

@matthewoates Performant linear progress, where art thou? 😄

@nathanmarks
Copy link
Member

nathanmarks commented Jun 2, 2016

@nathanmarks
Copy link
Member

nathanmarks commented Jun 2, 2016

@matthewoates
Copy link
Contributor Author

@nathanmarks : thanks for diving into this head first!

Chrome Version 50.0.2661.102 (64-bit)
OSX Yosemite Version 10.10.5
MacBook Pro (Retina, 15-inch, Mid 2015)
2.8 GHz Intel Core i7
16 GB 1600 MHz DDR3
Macintosh HD
Intel Iris Pro 1536 MB

Yes, my MBP has a dedicated graphics card.

Forgive me if the team is already aware of this, but I found a good Google IO talk about the various expenses of css transforms and other DOM manipulations. https://www.youtube.com/watch?v=thNyy5eYfbc
TL;DR: use transform (but only some transforms)

I think modeling the Linear-Progress component after Polymer's implementation would be great.

@nathanmarks
Copy link
Member

@matthewoates No worries!

I'll definitely check that video out. Do you fancy having a go at trying out the transform technique instead?

@nathanmarks
Copy link
Member

nathanmarks commented Jun 2, 2016

@matthewoates Nice to see that I'm not alone with my issues -- but you should see what happens on the internet with the 13" and no dedicated graphics card! 😄

@matthewoates
Copy link
Contributor Author

Yeah, I'm definitely interested. I'll have time to tackle this next week.

@mpontikes mpontikes mentioned this issue Aug 5, 2016
13 tasks
@oliviertassinari oliviertassinari changed the title linear-progress VERY expensive (50% CPU usage for 1 instance) [LinearProgress] VERY expensive (50% CPU usage for 1 instance) Sep 17, 2016
@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 12, 2017

The performance looks better on the v1-alpha branch:

Polymer

capture d ecran 2017-02-12 a 14 12 11

Material-UI

capture d ecran 2017-02-12 a 14 11 53

@oliviertassinari oliviertassinari added the component: LinearProgress The React component. label Feb 12, 2017
@oliviertassinari oliviertassinari added component: avatar This is the name of the generic UI component, not the React module! v1-alpha labels Jul 8, 2017
@oliviertassinari oliviertassinari added the component: progress This is the name of the generic UI component, not the React module! label Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: avatar This is the name of the generic UI component, not the React module! component: LinearProgress The React component. component: progress This is the name of the generic UI component, not the React module! performance
Projects
None yet
Development

No branches or pull requests

3 participants