Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Extreme CPU usage by Ant-Blazor Select-Component #1837

Closed
2 tasks done
true-perfect-code opened this issue Apr 27, 2024 · 2 comments
Closed
2 tasks done

[BUG] Extreme CPU usage by Ant-Blazor Select-Component #1837

true-perfect-code opened this issue Apr 27, 2024 · 2 comments
Labels
area/core Issue/Discussion/PR that has to do with the core of the toolkit bug Something isn't working unverified

Comments

@true-perfect-code
Copy link

true-perfect-code commented Apr 27, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

Dear Community

I am not sure if this problem is caused by the Maui ToolKit Nuget or if the Ant component Select has a problem.

Expected Behavior

It is about the following:
When using the Ant-Blazor Select component in a Blazor Server or MAUI Blazor App, it works as expected. However, if you also install ".NET MAUI Community Toolkit" via Nuget in a MAUI Blazor app, the Ant-Blazor Select component hangs. You will notice an extreme CPU usage which could be due to a focus event (possibly via JS Interopt).

It is interesting that this effect is not apparent with an HTML Select component. I personally think it is an Ant-Select component problem, but I don't want to rule out that this problem could also be caused by the ToolKit library. The question is why this is only the case with Ant-Select and not with HTL Select?

image

And by HTML Select is no problem:
image

Steps To Reproduce

Start github Project and select an entry from Ant-Select list.

Link to public reproduction project repository

https://github.com/true-perfect-code/MauiAppAntToolKit

Environment

- .NET MAUI CommunityToolkit: 6.0.1
- OS: Windows 10
- .NET MAUI: MAUI Blazor, NET 8 , Visual Studio 2022 Version 17.9.6

EDIT:

This problem has also been reported to the Ant-Blazor community and can be found here:
ant-design-blazor/ant-design-blazor#3832

If you are using a faster PC, you will not notice this problem. I have described this behavior in the Ant community on GitHub (see link above under point 1).

However, the problem exists because the CPU load is extremely high for about 10-15 seconds! It would be nice to know the reason for this.

@true-perfect-code true-perfect-code added bug Something isn't working unverified labels Apr 27, 2024
@brminnick brminnick added the needs discussion Discuss it on the next Monthly standup label Apr 27, 2024
@vhugogarcia vhugogarcia added the area/core Issue/Discussion/PR that has to do with the core of the toolkit label Apr 28, 2024
@GeorgeLeithead
Copy link
Contributor

I have tried it with creating a new MAUI Blazor hybrid project, adding the AntDesign Blazor package (and following the Docs to for 'getting started'), and adding to the Home.razor page a copy from the documentation, the SimpleSelect component. It causes the CPU on my laptop to go really high and stay high for a while. This is WITHOUT any .net MAUI Community Toolkit package added!

As such, I do not think it can not be an issue with the .net MAUI Community Toolkit!

image

You can find My sample code here, for which I used to verify.

@bijington
Copy link
Contributor

Amazing work @GeorgeLeithead thank you. I'll close this issue down

@bijington bijington closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2024
@brminnick brminnick removed the needs discussion Discuss it on the next Monthly standup label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issue/Discussion/PR that has to do with the core of the toolkit bug Something isn't working unverified
Projects
None yet
Development

No branches or pull requests

5 participants