-
-
Notifications
You must be signed in to change notification settings - Fork 468
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
🐛 High CPU usage for NavigationPane #173
Comments
I believed sticky indicator was the issue. Right now, the screen is updated every millisecond to render the sticky indicator, since it's a complex thing. |
@bdlukaa IMHO the "sticky" indicator looks great... but if the toll is having this high CPU consumption I don't know if it's worth keeping. I know that a significant effort will have been made to create and maintain it, but either we find a way to optimize it, or with the current implementation we will consume more energy than if we were mining crypto 😅. Having a polling every millisecond goes right against any of the Flutter performance best practices: https://docs.flutter.dev/perf/rendering/best-practices I suggest opening a specific development branch with this component (so as not to lose the current code) and remove it from the main code until we find a solution. Or, in the worst case, at least document the method code indicating the current performance problems, "waiting to resolve the issue #173" |
This problem is less visible on a Windows PC, but the rebuilds are still present. Currently, the use of I propose not to disable or remove the sticky from the code. The problem is here: https://github.com/bdlukaa/fluent_ui/blob/master/lib/src/controls/navigation/navigation_view/indicators.dart#L290 |
Totally agree to change this, because this indicates that
I said I DO love the effect, but I prefer performance over UX, at least until we find a solution to remove this |
Describe the bug
I am making an app for MacOS (Yes it's not officially supported), and I notice the high CPU usage for my app (Around 30%). It is weird since MaterialApp based app only use around 2% CPU on idle.
When I comment the NavigationPane code, the CPU usage decreased dramatically (To around 2% as I expect), and when I uncomment the NavigationPane again the CPU usage increased to around 30% again.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The CPU usage shouldn't be any higher than 3%
Screenshots
Additional context
The CPU stay high (Even when I idle/do nothing with the app, just keep it on foreground)
Here's the code I use (A new app with fluent_ui ^3.8.0 in pubspec)
The text was updated successfully, but these errors were encountered: