Switch keyboard layout on Gnome may cause lagging by 100% CPU usage.
It not happens with all layouts. In my case I'm using EN and PT.
Apperently the problem happens when Scroll_Lock is on.
Temporary solution is disable this key, since it is not frequently used.
$ sudo gedit /usr/share/X11/xkb/symbols/br
Comment line:
// modifier_map Mod3 { Scroll_Lock };