-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Very serious problem high CPU usage! #6308
Comments
We don't have an Idle process in place for minimization in our examples, and likely the app is running at maximum possible framerate since the Your application code can decide to pause when Minimized. |
Closing as duplicate of #2496 |
On the issue, I have found this problem, I'm sorry before without browsing
|
The solution in #3907 is more correct than checking for |
I have pushed ec1d2be which seemingly solves it for both cases of minimization and screen locking. Implemented this for the DX9, DX10, DX11 and DX12 examples. Both DX9 and DX12 weren't burning as much CPU when looping with no visible swap chain, as Present() would still honor vsync, but it's still best to not loop when locked. Note this issue for multi-viewports #7615 (comment) |
I've noticed that when I statically link my builds against OpenGL 2 and OpenGL 3, the CPU usage in Task Manager can reach around 20%. In contrast, dynamically linking results in significantly lower CPU usage, typically between 1% and 3%. Removing ImGui's code brings it back to normal values. What could be causing this difference in CPU usage between static and dynamic linking? |
What does statically linking against OpenGL 2 and OpenGL 3 means? |
Sorry my lack of experience showing up. So what I probably should've said is when I link against static libraries of SDL or GLFW. When I setup a new project I am using demos from the examples with SDL and GLFW installed with vcpkg without static command and they work what I assume fine. Problem I mentioned is when I setup my project in VS with vcpkg using its manifest file with with 'Use Static Libraries' to Yes. The the issue occurs. Doesn't happen on win32 - dx versions only on sdl/glfw - opengl |
Version/Branch of Dear ImGui:
Version: 1.89
Branch: viewport/docking
win32 dx11 win10
Back-ends: win32 dx11
Compiler: vs2022
Operating System: win10
My Issue/Question:
When its win32 dx11 binding process, minimize the interface, the utilization rate of CPU occupancy rate rise immediately to 50
Screenshots/Video
The text was updated successfully, but these errors were encountered: