You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.
DWL appears to be redrawing the framebuffer on every refresh. On my test NixOS VM running under libvirt with a default configuration, each of the 8 cores has ~65% CPU usage. With this patch applied, the CPU usage goes to near 0 when there are no clients.
diff --git a/dwl.c b/dwl.c
index c09f598..bb1315a 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1759,7 +1759,7 @@ void
rendermon(struct wl_listener *listener, void *data)
{
Client *c;
- int render = 1;
+ int render = 0;
/* This function is called every time an output is ready to display a frame,
* generally at the output's refresh rate (e.g. 60Hz). */
@@ -1770,6 +1770,7 @@ rendermon(struct wl_listener *listener, void *data)
/* Do not render if any XDG clients have an outstanding resize. */
wl_list_for_each(c, &stack, slink) {
+ render = 1;
if (c->resize) {
wlr_surface_send_frame_done(client_surface(c), &now);
render = 0;
This is not a pull request, just a test case to demonstrate the issue. This very quick and dirty patch disables drawing unless there is a client.
The text was updated successfully, but these errors were encountered:
DWL appears to be redrawing the framebuffer on every refresh. On my test NixOS VM running under libvirt with a default configuration, each of the 8 cores has ~65% CPU usage. With this patch applied, the CPU usage goes to near 0 when there are no clients.
This is not a pull request, just a test case to demonstrate the issue. This very quick and dirty patch disables drawing unless there is a client.
The text was updated successfully, but these errors were encountered: