XWM: get_atom_name() could maybe cache the names
struct weston_wm
could perhaps grow a hash table of known atom names, so that each and every call to get_atom_name()
would not need to be a roundtrip to the X server. We use get_atom_name()
a lot, also in wm_printf()
arguments where it is almost always done for no use (no-one subscribed to the debug scope).
However, as it is, get_atom_name()
acts as a synchronization point with the X server, because it is a blocking roundtrip to the X server. Removing that synchronization or making it happen randomly may cause new issues and may hide existing issues.