Skip to content
Snippets Groups Projects

Lower CPU usage when rendering bars

Merged Ghost User requested to merge (removed):bars into master

This patch lowers the CPU usage of the cpugraph plugin itself by a factor of 3 when rendering bars on a CPU with 16 threads. This is achieved by rendering the bars using Cairo instead of GTK.

The top pixel of a bar is alpha-blended with the background. This can help the user to read CPU usage more accurately on displays with a resolution of 1080p or smaller where the height (or width, depending on panel orientation) of the XFCE panel can be smaller than 32 pixels.

The width (or height, depending on panel orientation) of the section displaying bars is smaller by about 25%, which makes it better suited for modern many-core CPUs. (With a different GTK style than the one used for testing, it may be more than 25%.)

Before: Screenshot_20201031_190240 After: Screenshot_20201031_190709

Please note that the above images might be enlarged or shrunk by the web browser, which introduces some pixel aliasing.

Closes: #8 (closed)

Closes: #6 (closed)

See also: #7 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading