Commit a1fbb8f1 authored by bob5972's avatar bob5972 Committed by bob5972

compositor: Add cwindow_hash to optimize find_cwindow_in_screen

On my system when the window manager is mostly idling (0-12 tiny
updates per second), about half the CPU time in xfwm4 is spent in
find_cwindow_in_screen, iterating the linked list looking for a
matching Window id.  Instead, this patch adds a GHashTable to map
Window ids to CWindows, completely eliminating that cost in my
profiles, resulting in a 0.3-1.0% of a core total CPU reduction for
this workload.
Signed-off-by: bob5972's avatarMichael Banack <bob5972@banack.net>
parent 2fa246ca
Pipeline #2439 passed with stages
in 3 minutes and 18 seconds