MV's menus become increasingly laggy the more you use them.

Monitoring the performance of my game project, I confirmed something that I had noticed during a playthrough in my project - RPG Maker MV's computer usage woes are not exactly gone.

Opening the menu and closing the menu is the key to the problem, but it's not just doing it once or twice, it's doing it multiple times through a playthrough. Right away, you might say "no player is actually going to sit there and spam open and close the menu to make this happen" and I would mostly agree with you, unfortunately this issue... lingers. It adds up in the background, it doesn't care when you did it, as long as you do it within a single sitting.

You can recreate it VERY easily. New project, play game right away (meaning absolutely everything default), and just spam open and close the menu. You'll notice very quickly that the CPU usage rockets, but can just as easily go back down as long as you stop opening and closing the menu. That's fair. However, in the game itself you'll notice that the act of opening and closing the menu becomes an increasingly slower process. It goes from something that's snappy and fast to something that's delayed and sluggish.

The issue is magnified when you have plugins. In my own project, this problem causes the menu to take a full 2~3 seconds just to open and then another full 2~3 seconds to close. It's totally unacceptable.

This problem is irrelevant to my plugins though, as we discover that this happens in the base game (although perhaps not quite to the extent of 2~3 seconds).

What's the word on a fix for this?

I am using the latest version. I just made a new project to test it. Confirmed 1.5.1. Steam version if that helps.
Hmm, well, I attempted to replicate the issue in a fresh project. The highest the CPU usage on my machine was 15% while the highest RAM usage was around 250MB. However, after I left the game alone for five seconds and re-opened the menu, the garbage collector kicked in to lower the RAM usage to a rather normal 160MB. The CPU usage returned to normal, as well.

EDIT: Actually, on other attempts the garbage collector kicked in even while I was spamming the menu.
I would suspect this being a problem of hardware specs. I have variable times of drawing and closing menu, but that is simply because I have a potato PC.
Well, if this seems to only really happen to me then I won't concern myself with it too much. My specs are fine. 16GB RAM, 1070 GTX and a i5-7500 3.4GHz CPU.

It is really strange. I can easily get it going up to 25% CPU usage which is absolutely absurd.

What's weird is that even if I just wait a few seconds for usage to return to normal, opening and closing the menu in-game is still extremely sluggish. The menu's becoming slow after use does not seem to go away until I reload the game.

Even in a fresh project, the effect of menu's taking about 0.5~1s to open and close happens and keeps happening after I open and close the menu about ten times.
Opening a menu is always gonna be sluggish, because the resources RMMV is drawing make it very demanding.
RMMV needs to draw the windows
It needs to take screenshot and then blur it
Also, it does it all using cpu power, which is slow in itself.
If you want fast menu, you need to rewrite it.
Closing the menus is without a problem in my case, as long as I'm not too heavy on the map. And I have a Quad core 1.6 GHz and 4 GB RAM machine.
Yeah, removing the standard blurred menu background will vastly improve the load time for the menu.

The more features you pack into the menu system and the more plugins you introduce to the project, the more likely it is that everything is going to start slowing down. Probably the only way around that is to write all the code yourself to ensure nothing more than what you want is going on behind the scenes ... but then that takes time, and sometimes re-inventing the wheel is not worth it.
It's a known memory leak problem that was fixed with one of the updates. Is your version current?
Menu opening rapidly will always lag the system as the engine has to redraw the map then redraw the menu. As there is no good reason any user should EVER spam the open/close button that is not going to be fixed.

As was stated a long time ago, the dev team isn't going to fix issues due to misusing the engine or the games in the engine, as you wouldn't open the menu 250 times in a row in Mass Effect now would you? Use the game like a real user would, and then if an issue arises report it.

As for it adding up, no one has noticed it yet. See if you recreate it in a blank project. If you cannot, then it is the fault of the plug-ins you are using, and you will have to ask the plug-in authors to fix it, as there is nothing the MV devs can do to fix it.
@bgillisp That's very true. Although this person is saying the effect is accumulative, which implies the menu button doesn't have to be spammed. If I recall this was an actual issue once, but was resolved with one of the updates.
Right, the old memory leak. Forgot about that. So yes, make sure you are using 1.5.1 of MV for your project (not just the editor, but the project), try it on a blank project, and see if you get any kind of accumulation effect.
Hey. Thanks for reaching out.

No offense but everything brought up so far was covered in the original post. I already acknowledged that a player wouldn't spam the menu - I stated that it didn't seem to matter. Opening it and closing it as a normal player seemed to result that, after the 8th or 9th menu use over-time in a single sitting, it would start to become obnoxiously laggy.

As well, I already stated that I am using the latest version of 1.5.1, so that's also a non-solution.

Regardless, as it seems some of you have tested it, it does more and more appear to be an issue rather unique to my environment for reasons unknown. I'm pretty much okay with this. My biggest concern was launching a project and it have this effect for all users, so if it just happens with myself, then it's not a big issue for me.

Googling it to hell and back also heeded no real results, which further leans towards this being a relatively isolated incident. I can only now try to figure out what changed, because indeed, this wasn't happening to me either until a few days ago, but then that becomes a personal problem and less of an MV issue, so I'll figure that out on my own.

Thanks for taking your time.
Np. Still, if you get it in a blank project, please let us know by posting a copy of that blank project for the dev team to test.

As for what could cause it...my guess is the menu plug-in you are using? Start with that and see. Also keep in mind if your resolution for your game is really high it takes longer to load, so that will be a factor.

And, if you somehow have multiple plug-ins which effect the menu that could cause a real problem too. Check to make sure that didn't accidentally occur.

PS: If you want help finding the cause, let us know and we can move this thread to plug-in support. You'll want to also post a list of your plug-ins as well.

Original thread: https://forums.rpgmakerweb.com/threads/mvs-menus-become-increasingly-laggy-the-more-you-use-them.85293/