Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

mdSubheader: High CPU usage with AngularJS 1.4.x #3531

Closed
izstas opened this issue Jul 1, 2015 · 10 comments
Closed

mdSubheader: High CPU usage with AngularJS 1.4.x #3531

izstas opened this issue Jul 1, 2015 · 10 comments
Assignees
Labels
hotlist: animations type: performance This issue is related to performance
Milestone

Comments

@izstas
Copy link

izstas commented Jul 1, 2015

I was trying to use a sticky <md-subheader> and found out that on my page it appears to cause a high CPU usage when I try to scroll a container with subheaders. The subheader example at https://material.angularjs.org/latest/#/demo/material.components.subheader works just fine.

Here is the output of Chrome's CPU profiler:
CPU profile
.cpuprofile file

I am able to reproduce the problem with this CodePen on Chrome 43.0.2357.130, 45.0.2438.3, Microsoft Edge 20.10158.0.0. The page uses AngularJS 1.4.1 and Angular Material 0.10.0.

Is this a bug or am I trying to use the <md-subheader> in a wrong way?

@izstas
Copy link
Author

izstas commented Jul 2, 2015

It appears to work just fine with AngularJS 1.3.15. Still reproducible with AngularJS 1.4.2-build.4089+sha.d193c3a.

@izstas izstas changed the title Sticky md-subheader causes high CPU usage mdSubheader: High CPU usage with AngularJS 1.4.x Jul 2, 2015
@izstas
Copy link
Author

izstas commented Jul 2, 2015

After further research, it appears that the issue is introduced by angular/angular.js@0adc036. The problem is reproducible with this version (https://codepen.io/izstas/full/rVJYMd/) and not reproducible with the previous one (angular/angular.js@1ee5861 - https://codepen.io/izstas/full/KpQyGQ/)

@ThomasBurleson
Copy link
Contributor

@matsko, @jeffbcross, @jelbourn - The latest comment from @izstas seems to spotlight a raf.js issue. How should we more accurately report apparent AngularJS issues seen from Angular Material component usages ?

@ThomasBurleson ThomasBurleson added this to the 0.10.1 milestone Jul 2, 2015
@ThomasBurleson ThomasBurleson self-assigned this Jul 2, 2015
@ThomasBurleson ThomasBurleson added the type: performance This issue is related to performance label Jul 2, 2015
@jeffbcross
Copy link
Contributor

@ThomasBurleson the issue should be opened on the angular.js repository with a reference to the original issue on angular/material. There should probably be some kind of "Material" label on angular/angular.js that could be applied to these kinds of issues to help track them. @petebacondarwin is that reasonable?

It'd probably be worth bringing up material-related issues in the internal angular-1 channel as well.

@petebacondarwin
Copy link
Contributor

Yes, an issue should be created in Angular.js. I created a label called "hotlist: material" for this sort of thing.

@ThomasBurleson
Copy link
Contributor

@petebacondarwin: I created angular/angular.js#12280. I could not assign a label, however, since I am not a contributor to that repos. Would it be possible to add me as a contributor so I can manage issues from Angular Material - to - AngularJS ?

@jeffbcross - Thx

@nextor2k
Copy link

+1

1 similar comment
@cah-alexsukhodolsky
Copy link
Contributor

+1

@clshortfuse
Copy link
Contributor

Will be fixed in Angular 1.4.5

Already fixed in master

@izstas
Copy link
Author

izstas commented Aug 20, 2015

Yep, seems to be fixed by angular/angular.js@dc48aad. Thank you!

@izstas izstas closed this as completed Aug 20, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hotlist: animations type: performance This issue is related to performance
Projects
None yet
Development

No branches or pull requests

7 participants