Topic: High CPU Usage with mdspinner
Hello!
I see high CPU usage with my angular 4 app. when I use Spinner.
When I remove mdb-spinner - no CPU usage.
<mdb-squeezebox [multiple]="false" aria-multiselectable="true"> <ul class="collapsible popout flows"materialize="collapsible"data-collapsible="accordion"watch> <mdb-itemclass="row flow z-depth-2" *ngFor="let flow of workflows"id="flow{{flow.id}}"> <mdb-item-head> Header </mdb-item-head> <mdb-item-body> <!-- Tabset tabs --> <mdb-tabset *ngIf="flow.loaded" #staticTabs [buttonClass]="'nav-tabs tabs-3 pills-red white margin'" [contentClass]="''" class="text-uppercase"> <mdb-tab *ngFor="let tab of tabs"heading="{{tab.name}}"></mdb-tab> </mdb-tabset> <mdb-spinner spinnerType="big" *ngIf="!flow.loaded"></mdb-spinner> <app-workflow [item]="flow" *ngIf="flow.loaded"></app-workflow> </mdb-item-body> </mdb-item> </ul> </mdb-squeezebox>
Sebastian Kaczmarek staff pro premium answered 7 years ago
Paperfree pro commented 7 years ago
That problem only if I use mdb-spinner in *ngFor. I see that there are infinite call of requestAnimationFrame.FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No