Closed mbrubeck closed 3 years ago
There's still a problem with event polling. Applications built against this branch use 100% of a CPU even when they should be idle.
There's still a problem with event polling. Applications built against this branch use 100% of a CPU even when they should be idle.
This was caused by rust-windowing/winit#1372 which is fixed on the winit master
branch.
@mbrubeck so, we have to wait for the next release of winit?
@mbrubeck so, we have to wait for the next release of winit?
Yes, I wouldn't recommend releasing this while that bug is still in the latest version.
There's still somewhat higher-than-expected CPU usage during idle, at least on Mac, using winit master. I'll try to investigate that soon.
Current status: I haven't had time to work on this recently. If anyone else would like to help by improving the code or investigating the performance issues, that would be great.
@mbrubeck Don't worry. Just take your time.
Possibly related: https://github.com/rust-windowing/winit/issues/1339
Thanks, that's interesting. I've rebased this branch, updated it to glutin 0.25 and winit 0.23, and tried using ControlFlow::Wait (though I'm not sure I'm using it correctly). My Mac program still uses too much CPU, though I'm still not sure where the fault lies for that. Help is still welcome.
I can't reproduce the issue on Windows 10. Do you have any sample code you can share with the issue? What are you using to drive the event loop?
Hello there
As far as I know, high CPU usage on MacOSX was fixed and merged to master on January 10th 2020. https://github.com/rust-windowing/winit/pull/1380 Also, latest release of winit(0.24) which implements the bugfix was released on December 10th 2020. Glutin 0.26 depends on winit 0.24 so it should be safe to bump glutin to 0.26 in glutin_window. I may attempt to do it myself and send a pull request but I must warn you, I am not very experienced in this and results may not be optimal.
I am tracking this issue for some time, I had to fork 4 crates to make my app running on latest Linux Fedora. EDIT: i bumped glutin to 0.26.0 in my branch but I did not have time to test it. I will get back to it in a month or so https://github.com/lubosmudrak/glutin_window
@lubosmudrak this sounds encouraging. Maybe we should merge and fix minor issues later.
@mbrubeck , what do you think?
Sounds good. I'm not sure I'll have much time to write code for this any time soon, but I'm happy to help test or debug. I can also try to put together a reproducible example program if I'm still having any performance problems.
Merging
Thanks!
This updates pistoncore-glutin_window to glutin 0.25.
Basic functionality is working, though I haven't done extensive testing.