I have 48 gems, doing combat and gem merging. The biggest spikes come when I spend a lot of mana.
The high CPU usage when the game is out of focus was because of a Firefox plugin, not because of your game.
Out of curiosity, what extension was it? Because I'm using a Firefox fork and whenever I leave the game running in a background tab for awhile, I usually have to open the browser's task manager and force close the GPU thread and then reload the game or else it will lag for awhile after switching back.