That's a feature of your browser, actually. It'll slow down javascript on non-active tabs. You can adjust it in your advanced config settings (go to "about:config" as a url if you're on firefox), but it's *generally* not recommended and is thus a rather arcane thing to adjust. You can avoid most of it by opening a new window with the game as the only tab, or just run the desktop version.
Yeah this is a bit of a necro, but figured it'd help to put the answer here!