Skip to content

High CPU usage when showing screen contents #31

Description

@helmutg

When enabling "Show Screen Contents" (default enabled), wdisplays causes high CPU usage. It is actually distributed to wdisplays and sway both of which permanently consume about half a CPU (but not several). Disabling "Show Screen Contents" signifcantly reduces the consumption.

I guess that the preview is updated as fast as possible in a less than optimal way. Would it be possible to find compromises here?

  • Limit the update rate to reduce CPU usage
  • Offer an option to show the initial screen contents and never update them essentially treating them as a screenshot
  • Figure out why this is so inefficient when combined with sway

This behavior is reproducible on both Debian bookworm and trixie on amd64 using

  • wdisplays/1.1-1 and sway/1.7-6
  • wdisplays/1.1.1-1 and sway/1.10.1-2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions