so, there are currently 2 copies involved? because ...

A) xwayland currently does not handle unredirect and ...
B) mutter-wayland does not currently optimize for fullscreen (change scanout buffer or use overlays)

also, i don't see any -O flags in the compiler arguments .. are you sure at least -O2 is enabled?