1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-24 13:52:55 +03:00
wezterm/window
Wez Furlong 0e568ea161 wayland: reduce CPU utilization by correctly handling Refresh
On a Fedora 31 system running Wayland I noticed that wezterm and
the compositor were running pretty hot on their respective CPU
cores.

It turned out that we had a lot of
[Refresh](https://docs.rs/smithay-client-toolkit/0.6.4/smithay_client_toolkit/window/enum.Event.html#variant.Refresh)
events being generated and consumed. We were treating this as needing
a full paint so we'd be effectively continually running the opengl
paint cycle over and over.

The docs for that event say that it is intended to refresh the client
decorations so let's focus it towards that instead.  This does bring
the CPU usage back down to intended levels.

I believe this hot CPU usage to be compositor-dependent: this is the
first I've seen of it out of 4 different Wayland environments!
2019-12-27 08:48:00 -08:00
..
examples failure -> anyhow + thiserror 2019-12-14 21:43:05 -08:00
src wayland: reduce CPU utilization by correctly handling Refresh 2019-12-27 08:48:00 -08:00
build.rs window: use wgl for opengl on windows 2019-10-24 19:12:18 -07:00
Cargo.toml failure -> anyhow + thiserror 2019-12-14 21:43:05 -08:00