How are maps managed when battles are processed?

So, I have this theory brewing on managing lag in battles when you have various things going on in maps (looping animations, lots of events, maybe parallaxes, etc). But I want to ask how this works before getting too deep in this "Battle Manager" map idea/trick that I am experimenting with.

To my understanding, when a battle starts after the transistion effect... the battlebacks are loaded and pasted over the maps and the encounter's battlers are called onto the stage floor to "do their thing", so to speak.

While this is going on, events on a map are generally stopped but still being tracked and "remembered" while battle is taking place. Is this accurate?

I have a system I am testing that moves the player to a blank, black map with no events before a battle happens (via Common Event and some variables and switches). Once the battle is over, the player is taken back to the map they were on. The way this is evented in presentation is almost seemless and appears to help with lag when taken away from maps with a lot of stuff going on.

So... am I losing it? Or does this theory (along with my understanding of how battles work under the hood) actually hold up?

Thanks for your time!

-TC
It might work well actually. The game pauses it by taking a snapshot of the map before a battle, and that snapshot takes up more memory the bigger the map is. So it would stand to reason a bigger map would cause some battle lag too.
Ahhh... now that also makes more sense!

Thought about this more as I have been experimenting with this for a couple of days. Either making a quick tutorial on how to engineer this through eventing & scripting way or maybe working together a simple plugin so that games could manage this a bit better.

But I was not sure about this if it was just helping with my project or if it could be more helpful in general.
https://atelieririna.itch.io/performance-upgrade

This explains some of it, though the post says it for the menu. I imagine it is similar for battles though.
So... the snapshot is simply used for the game to remember stuff?

That plugin seems to make sense from a lot of things, actually.

Fallen Angel Olivia (at least, I think that is who this is?) has been rather brilliant in what creations I have seen thusfar. It's too bad I don't even have dimes to rub together to send her way on these little gems.

Anyway, I think I have a few ideas I might work on regarding this. I will probably start working on a "ghost map" tutorial of sorts if one doesn't beat me to the punch, already. 🙂

I get the feeling that a lot of other things contribute to battle lag but I think I am good to go. Thanks for your time!
Or Irina, rather? I was wrong. My bad.
Watch out for that double posting yo!

Hmmmmmmm, reading what you're trying to do, I actually used that exact idea before. Long story short, the map was laggy and unstable due to an old script, and this allowed things to work better for the battle screen.
The map is "lost" when the battle begins, in a sense that you're actually transported to Scene_Battle from Scene_Map (so no map processing of any kind happens at this point, its a completely new scene, not just painted above the map). As bg said though, the data for the map is still on memory which adds to the memory usage of the game. So yeah, having a map with very little in it might help alleviate some lag because it will help free some resources from memory before the battle.

Its actually the same for when you're opening the menu, you're transported from Scene_Map into Scene_Menu (or any other Scene actually) the game keeps the data of the map in memory so that when you close the menu they can return you to Scene_Map and everything will be like before you opened the menu.

Original thread: https://forums.rpgmakerweb.com/threads/how-are-maps-managed-when-battles-are-processed.106235/