WPF Performance - GPU overhead/usage plummets when Visual Studio GPU profiler attached #5222
Labels
Discuss In WPF Team Triage
.NET Framework
Question
General question, not a problem in source code or documentation (yet)
Milestone
This issue has been moved from a ticket on Developer Community.
I have a WPF application which contains lots of real time effects - drawing directly to bitmaps, shader effects, etc. - and it all works great. However, GPU usage is a higher than wanted - there are sometimes performance issues and smoothness issues. During the process of optimising, I tried attaching the Visual Studio profiler. When this is attached, and GPU Usage is selected as one of the profiling tools, when my WPF application runs… the same app, with the same content… GPU usage might be 50%+ less with better/smoother performance.
This is a duplicate of an open problem which I have been waiting for well over a year for MS to address. It has already been acknowledged by MS, and MS had already managed to replicate the issue. Other people have had and reported seeing the same problem. The original ticket has just been closed ?automatically? by MS because it was old, not because anything has been done about it, and says to re-report the issue here if it still happens. This issue possibly affects large numbers of other WPF projects if there are fundamental performance things going on with WPF itself.
You can see the original posting here which includes details, screenshots, examples, tests across different solutions and different h/w, extra information, example projects, etc.etc.etc.
Noting this technology isn't available in later frameworks such as UWP and WinUI.
Also to requote...
"....so we've seen this across multiple WPF apps on multiple .net frameworks - same thing on all. We are questioning if this could be pretty fundamental across a much wider WPF landscape?"
M.
Original Comments
User Two on 8/19/2021, 11:56 AM:
Verify the video card is not simply ramping up its performance. Lock the GPU to max speed, and memory, etc. Video cards loaf as much as possible. Sound familiar? If you monitor the GPU for its performance (to see if maxed, etc.), use software from the card maker and not from MS. The MS stuff just doesn’t work in real life*.
*FH4 running 4K 60 fps shows about 1% in TaskMgr’s GPU.
Feedback Bot on 8/19/2021, 08:08 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
mbasta00 on 8/26/2021, 03:11 AM:
User Two check the original post referenced, we did that and a load more, there’s a mass of information on it. And MS replicated the issue already. But thanks for the suggestion!
User Two on 8/26/2021, 00:50 PM:
That’s a lot (of going obviously around the round places) but still not using the card maker’s utility[*] to see the GPU freq. and its memory freq., and its voltage. The GPU ramping up its performance is the most likely explanation. Using MS tools to see what’s going on at the GPU is a mistake.
Don’t take this the wrong way. Take it as a road map. You do want to get over this right even if it means you spent a year+ chasing a ghost? (J/K, not) If you have used such a tool[], which, exactly, have you? You only ever mention TaskMgr as a way to see the GPU. These card-maker utilties[] are very simple-to-use software programs that are made for users – button pusher types.
[*]Video card makers have special software that controls the GPU on their cards. EVGA, e.g. has good stuff. I’m sure Asus and the others do, too. Use that kind of software to see what’s going at the GPU.
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: