High CPU usage

Hi,

We have noticed what appears to be excessing CPU usage when using the SfSpinner and wondered if this is a bug or something we need to do differently. 

What we are seeing is the CPU go up drastically when the spinner is visible (even when the page does nothing else). For example, when debugging, my total CPU usage could be around 20% but then toggle the Spinner to be visible and the CPU can go up to 90% (mostly Visual Studio). I don't even need to look at Task Manager because I can hear the fan kick in! This has happened in various versions including 18.4.35 and 19.0.1.55

This is the basic code to reproduce it by clicking the "Toggle Spinner" button:-

<div>
    <button title="Toggle Spinner" @onclick="@( () => { spinning = !spinning; } )">Toggle Spinner</button>
</div>
<div>
    <Syncfusion.Blazor.Spinner.SfSpinner Visible=@spinning />
</div>

@code {
    bool spinning = false;
}

5 Replies 1 reply marked as answer

RK Revanth Krishnan Syncfusion Team April 8, 2021 08:41 AM UTC

Hi Simon, 
 
 
Greetings from Syncfusion support. 
 
 
We have validated your query “We noticed that the CPU usage is very high when using the SfSpinner and when the spinner is visible”. 
 
We tried to reproduce the issue in the following ways, 
  • Rendered the shared code snippet in the server-side project.
  • Rendered the shared code snippet in the client-side project(WASM).
  • Also, ensured the CPU usage in both the task manager and Visual Studio.
  • Ensured the issue in all browsers.
 
But we couldn’t reproduce the reported issue from our end. We have prepared a sample for your reference, 
 
Sample: 
 
 
Can you please share us with more following details, 
  • The exact package version used in the application.
  • Is only the spinner rendered in the issue reproducing page?
  • The video illustration of the issue reproduced in your machine.
  • If possible please share us with the issue reproducible sample or please modify the shared sample with the issue reproducing code.
 
The above details will be helpful for us to validate and reproduce the issue from our end and assist you at the earliest. 
 
Regards, 
Revanth 


Marked as answer

SF Simon Fitzgerald April 8, 2021 10:13 AM UTC

Sorry, I should have mentioned that the issue was Server-side with .Net Core 3.1.

I have attached a project that shows the issue and included a couple of screen shots of the CPU usage I am seeing.

I tried the Server-Side project that you supplied but I was not able to get it to compile even after I installed .Net 5 SDK but think my setup just doesn't support that for some reason.

Attachment: SpinnerCPUIssue_5fc2f836.zip


RK Revanth Krishnan Syncfusion Team April 9, 2021 11:25 AM UTC

Hi Simon, 
 
 
Good day to you. 
 
 
We have further validated your query, and we can reproduce the issue from our end and it occurs only in .Net 3.1 and it works fine in .Net 5.0. We will validate the issue deeply and we will let you know with further details on or before 13th April. 
 
We appreciate your patience till then. 
 
Regards, 
Revanth 



IS Indrajith Srinivasan Syncfusion Team April 13, 2021 11:16 AM UTC

Hi Simon, 
 
Good day to you, 
 
We have further validated on the reported issue and have confirmed “Blazor SfSpinner high CPU usage when rendered” as a bug from our end and logged the report for the same and the fix will be included with our patch release on the 27th April 2021. 
 
You can now track the current status of the report, review the proposed resolution timeline, and contact us for any further inquiries through this link: https://www.syncfusion.com/feedback/24228/ 
 
Regards, 
Indrajith 



GK Gunasekar Kuppusamy Syncfusion Team July 28, 2021 07:21 AM UTC

Hi Simon,


Thanks for contacting Syncfusion support.


We have already resolved this issue from our end and included it in the 2021 Vol 2 main release.

Release notes: https://blazor.syncfusion.com/documentation/release-notes/19.2.44/?type=all#spinner

So kindly upgrade the spinner version to 19.2.44 or the latest version and let us know if the solution resolves the issue from your end

Regards,
Gunasekar


Loader.
Up arrow icon