I haven’t done it, but from what I know of SRAM, it’s probably as close to instant as doesn’t matter.
If you’re that worried about it, you could try to power the cart during the process (being very careful not to short anything) and let the battery manager IC keep the chip powered while the battery is out. Probably too difficult and dangerous (to the cart if not yourself) to be worth trying, though…
BTW, you’d also want to make sure the chip-select and write signals to the SRAM were disabled, otherwise spurious noise would probably scramble something, anyway. But, again, I don’t recommend it.
I’ve heard that it is possible to connect a second battery to the system while you’re replacing the original battery, similar to what RunnerPack says. I like his idea more, though — run power to the board in place of the battery, do the swap, remove the power source.
But really, yeah, look into a Retrode, heh.
Last time I replaced a battery, I looked into installing a socket onto the SNES cart board, so that (in 20 years lol) when I have to do it again, it’s a much easier process. I followed this video, which has part numbers in the description. The battery socket he picked out fits into an SNES cart without having to modify the case. I bought a 10-pack some years ago.
It probably takes away from the “purity” of the cartridge, which is why I did my Donkey Kong Country that wasn’t saving but haven’t done my Earthbound or Chrono Trigger yet, but I think about it…