Skip to content
Snippets Groups Projects
Commit a1fbb8f1 authored by bob5972's avatar bob5972 Committed by bob5972
Browse files

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: default avatarMichael Banack <bob5972@banack.net>
parent 2fa246ca
No related branches found
No related tags found
1 merge request!10Add hash to optimize find_cwindow_in_screen look-ups
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment