MappingNotify event freezes drawing windows for ~100ms
Edit: Closed because I found this issue does not exist in i3-wm, which also runs under X, so the issue must lie elsewhere.
Whenever a MappingNotify event is fired, all windows stop drawing for a short while. During this time the mouse cursor remains active and visible, and can even switch between different icons (cursor, arrow, etc.). Firing the event multiple times in a row compounds the amount of time the system looks frozen. Typically this happens when you have two connected keyboards and press keys first on one, then the other.
An easy way to reproduce this is with the following command
watch -n 0.1 'xdotool key space'
and then pressing any other key or series of keys in another window
I couldn't find any way to log whatever it is that's causing the issue.