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:
Michael Banack <bob5972@banack.net>
parent
2fa246ca
No related branches found
No related tags found
Checking pipeline status
Loading
Please register or sign in to comment