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

Autohide LayoutAnchorable causes CPU load on idle #169

Closed
ladych opened this issue Jun 26, 2020 · 3 comments
Closed

Autohide LayoutAnchorable causes CPU load on idle #169

ladych opened this issue Jun 26, 2020 · 3 comments

Comments

@ladych
Copy link

ladych commented Jun 26, 2020

Steps to reproduce

*Build attached Project
*start project
*select Layout test
*Click edit field (in order Tab doesnot autohide).

While Autohidden Tab is visible something causes cpu usage even if the user does not do anything.
AvaloneCpuConsumptionReprodeucer.zip

@Dirkster99
Copy link
Owner

Dirkster99 commented Jun 26, 2020

Hi, I am having trouble to verify your issue with your test client. I see only a small increase in CPU percentage (between 0.2% and 0.1 percent for a short moment) when I activate or deactivate the app. Otherwise, the percentage of CPU usage is at 0.0%.

Untitled

Should I be doing something else to verify your problem?

Ah, I think I see now what you mean (you are referring to this state, right?):
Untitled1

This is probably due to the code in the AutoHideWindowManager which is being called on a timer base to check if the control can be closed. The timer can be configured with the AutoHideDelay dependency property.

Would setting a different AutoHideDelay value improve this for you or would you solve this in a completely different way? If so, please show me the PR :-)

@Dirkster99
Copy link
Owner

The issue seems to be caused by the default AutHideDelay=0 value - I see that the CPU load goes down to 0% if I use 500 as AutoHideDelay value and the UI is still as responsive as before. Do you think using 500 as AutoHideDelay default value would improve this or would you rather use a different value?

@ladych
Copy link
Author

ladych commented Jun 29, 2020

In my case 500 ms helps. Some default velue is very helpful for novice.

@ladych ladych closed this as completed Jun 29, 2020
Dirkster99 added a commit that referenced this issue Jun 30, 2020
Autohide LayoutAnchorable causes CPU load on idle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants