I am also on Linux and Firefox - it runs okay here, but that’s going to be heavily dependent on hardware and how your system is set up - I’m on Wayland and KDE6 with latest Nvidia drivers.
The game itself does have a handful of screens where you can see slowdown, but not generally just by firing with no enemies present. The Observation Deck uses some complex parallax that has a performance impact, and you can see some dropped frames there while all three enemies in the room are still active. The long corridor in Medical can have some because of the AI for the sniping enemies, and the first room of medical can slow down when you approach the door to Surgery if the enemies are still alive and active.
If you don’t mind, what emulator were you using outside the browser? And does the performance of the Demo seem worse than other Gameboy Color games in that emulator?