-
Notifications
You must be signed in to change notification settings - Fork 51
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 with 1.0.781-prerelease #878
Comments
I've reproduced this problem with both the WPF and WinForms controls. It's caused by a continuous stream of WM_PAINT messages being generated, keeping the UI thread close to 100% busy. This also saturates the message loop and sometimes prevents other controls from receiving a WM_PAINT. You can verify this as follows:
This needs to be fixed ASAP, because the control is close to unusable right now. |
~15% CPU usage. I had to downgrade to 1.0.705.50. |
Thanks for finding this - I've filed a bug on our backlog and we're taking a look right away. |
Hello all! We are working on getting another release turned around as soon as possible with the fix for this. In the mean time, you can try this workaround:
|
This sort of works, but still got the issues with z-order. Any WebView2 that paints, comes to the front. |
@ukandrewc does your code in WndProc look like this?
Re: your last message, you don't need to fill out PaintStruct at all |
@johna-ms Yes, it does (I work in VB, but it's the same) I've attached a screen-capture (had to zip as GitHub not accepting wmv) There are two WebView2s controlled by z-order (Web1, Web2) When the 2nd tab is clicked it calls web2.BringToFront(), but when eBay (Web1) refreshes, it becomes visible again. Not sure if it's transparency or Z order. For anyone else in VB:
Thanks, I deleted the question once I'd read your code properly (been a while since I've done any winapi) ;-) |
So this fixes the CPU issue for you but not the related issue about items refreshing on the form? Seems like you're finding a different issue? So this doesn't repro on the older prerelease package? I'm going to work on a repro for this to investigate. |
Yes, sorry, just realised this issue is only for High CPU usage, not #875. It does allow other controls on the form to refresh normally, but I'm still still seeing transparency issues with Z order (Shown in the video above) I also had to add Web2.Refresh() after Web2.BringToFront() |
It seems that whichever WebView2 paints last, gets to be visible, but this doesn't affect main scrollbars. When Web2 is at the front of Z order, and Web1 is refreshed, it becomes visible. Scrolling Web2, shows it's content again (until Web1 content changes). |
Ok that's definitely weird. We're tracking it on our end as a separate issue. Thanks! |
In the video Web2 is at the front (HTML Table) Video_2021-02-04_194717.mp4 |
Tracking this on github here |
Thanks |
The high CPU usage should now be fixed in 1.0.790-prerelease SDK package. Thanks! |
Description
High CPU usage while doing nothing. This problem is only present from
1.0.781-prerelease
.1.0.721-prerelease
and1.0.705.50
are ok.Version
SDK: 1.0.781-prerelease
Runtime: 89.0.774.8 (Official build) dev (64-bit)
Framework: .NET 5.0.102 + WPF
OS: Win10 10.0.19042 Build 19042
Repro Steps
Run the following code:
Program.cs
Repro.csproj
AB#31577027
The text was updated successfully, but these errors were encountered: