Material-ui: [LinearProgress] VERY expensive (50% CPU usage for 1 instance)

Created on 2 Jun 2016  路  12Comments  路  Source: mui-org/material-ui

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
Avatar LinearProgress performance

Most helpful comment

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

All 12 comments

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

@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)

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

image

Or material design lite:

image

materializecss is even worse:

image

@matthewoates Performant linear progress, where art thou? 馃槃

@matthewoates Polymer's is best for me so far: https://elements.polymer-project.org/elements/paper-progress?view=demo:demo/index.html&active=paper-progress

image

@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.

@matthewoates No worries!

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

@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! 馃槃

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattmiddlesworth picture mattmiddlesworth  路  3Comments

finaiized picture finaiized  路  3Comments

ghost picture ghost  路  3Comments

chris-hinds picture chris-hinds  路  3Comments

anthony-dandrea picture anthony-dandrea  路  3Comments