-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
ExtractHexDigits high CPU Usage + Time #3133
Comments
This bug gets extremely noticable when using a grid with a huge amount of data and switching between pages with different grids. Shortly tested again. Without static declaration of the regex 50 calls take 91ms. Declaring the regex outside of the method and calling it 10.000 times only takes 42ms. |
Nice catch, thanks for troubleshooting. |
Sure no problem! |
It is used just as an extra step to make sure the end string contains a valid value that can be converted to the real |
Hm okay we have also thought that. So it is kind of much needed? Otherwise I would have just removed it 🤣 |
I would leave. You have no idea what users could try to enter :) |
Fair enough haha 🤣 |
Using Theme Provider slows down the whole application. This is caused by ExtractHexDigits being called multiple 1000 times.
Taking up to 3500ms for 2500 calls.
Use the method:
Blazorise/Source/Blazorise/Themes/ThemeGenerator.cs
Line 1317 in e0f1f9a
Fill it with any hex color string and run it 2500 times in a loop.
This will take arround 2600ms.
2500 runs taking only couple of ms.
Simple fix to reduce the time and usage drasticly:
Declaring the same regex each time the function is called slows it down.
The text was updated successfully, but these errors were encountered: