Skip to content

High CPU usage in windowlist when it's too wide #150

Open
@lcolitti

Description

@lcolitti

To Reproduce
Steps to reproduce the behavior:

  1. Use wf-panel
  2. Use one panel on bottom of screen with several widgets including a window list,
  3. Create lots of windows, such that the window list width is constrained by available panel width

Expected behavior
Windows icons in list get smaller and CPU usage stays low.

Actual behaviour
wf-panel starts consuming 100% of one CPU. WayfireWindowList::on_draw continuously runs this code - maybe once every frame?

    /* We have changed the size/number of toplevels. On top of that, our list
     * is longer that the max size, so we need to re-layout the buttons */
    if (preferred_width > allocated_width && toplevels.size() > 0)
        set_button_width(get_target_button_width());

Wayfire version
0.7.4-2 from debian testing

Panel configuration

widgets_left = menu launchers spacing4 window-list
widgets_center = none
widgets_right = volume network battery clock
# ... configuration for 6 launchers
launchers_spacing = 0
launchers_size = 34

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions