Topic: High CPU Usage with mdspinner

Paperfree pro asked 6 years ago


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 answered 6 years ago


Hi Paperfree, Thanks for your note. Since this component is created by CSS only, this is pretty strange. Nevertheless, we will take a look at this issue. Regards, Sebastian

Paperfree pro commented 6 years ago

That problem only if I use mdb-spinner in *ngFor. I see that there are infinite call of requestAnimationFrame.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags