MV Experiencing RPGMaker MV (engine) lag and sttutering

Hello
Im experiencing constant lag, stuttering and crashes while working on the rpgmaker MV.
My project has become quite "big" and Im uncertain if this is the cause. Sometimes simply opening the database it crashes, sometimes opening variables or setting a new switch it gets "stuck" for a second including my mouse or stutters constantly.
I have to say I have over 100 maps, hundreds of switches and variables. Although even with that, I find odd the lag occurs when Im using the software. Does that stuff applies that much of a heavy load on the software? Or this kind of performance issue may be unrelated?

I saw somewhere that the RPGMaker cant handle more than 2 GB of RAM, but the lag occurs at 300-400 mb anyways. I do have notice it crashes at above 1 GB, but it also does below it.

I'm using Windows 11 AMD Ryzen 5 3600X 6-Core Processor and a 4070 GPU and 32 GB Ram

Is this a software limitation? Is there something I can do to improve it?

Thank you
it seems you have a nice specs for the engine, but what version of PIXI and NWJS
do you use?

if its 0.29 and 4.5.4 (base for MV), than I highly recommend updating it to
at least 0.48.4 NWJS and 4.8.9 PIXI or better.

[watch this thread].

if you aim for steam achievement, 0.49.2 for NWJS is needed or later which
you should check the thread pages to see what version works best for them.

your free to use whatever NWJS version to pick, but use a suitable PIXI version
with it as well as it may help.
it seems you have a nice specs for the engine, but what version of PIXI and NWJS
do you use?

if its 0.29 and 4.5.4 (base for MV), than I highly recommend updating it to
at least 0.48.4 NWJS and 4.8.9 PIXI or better.

[watch this thread].

if you aim for steam achievement, 0.49.2 for NWJS is needed or later which
you should check the thread pages to see what version works best for them.

your free to use whatever NWJS version to pick, but use a suitable PIXI version
with it as well as it may help.
Thank you.
I saw someone say this only affects the game performance and not the editor though, is that correct? I ask before messing with the files because I see some people having some bugs.

I don't really have problems running the game, I only have them when using the editor/engine itself. I'll still check carefully that guide though since it seems useful to improve performance, but it doesn't seem to affect the editor itself which is where I have the problem.
There are threads reporting editor crashes if the user has event pages thousands of lines long so yes, loading a bunch of data at once could cause the issues you describe.
There are threads reporting editor crashes if the user has event pages thousands of lines long so yes, loading a bunch of data at once could cause the issues you describe.

There isn't events with thousands of lines but I do have a lot of events scattered around in different maps. I also have 1320 switches (not all of them being used as I try to keep segments organized) and 400 variables (same thing).

Do these amount of switches/variables can cause lag while using the editor? Do the amount of pages in the database (Enemies, Items, etc) can cause lag? I mean, I'm not doing anything crazy either, 70 enemies, 200 items, or things like that.

Sometimes I use Events as a sort of "animated tile", do these stuff stacks with each other provoking lag? Even if Im not working on that map?
It's speculation on my part because I haven't personally stress tested the engine but hypothetically, yes, if you are on a window in the editor where it is trying to load a lot of data (whatever it may be) it will lag or even crash the engine.
It sounds like there's a bit of a confusion of terms here. The word "engine" refers to the runtime code that your game is based on, so to say you're having performance problems in the engine implies you're seeing issues when you run your game. But from what you've actually been saying, it sounds like your problems are actually in the editor, not the engine.

Here's some speculation about things that may or may not be able to cause lag:
  • I wouldn't expect the number of maps to cause lag in the editor. Nor would having a lot of "animated tiles" – the editor doesn't animate them, so that's basically irrelevant.
  • Having a really large map (999x999) could maybe cause some problems, or a map with a really large number of events (300 events?).
  • I don't think something in a map you're not even working on would cause problems, as long as you save regularly.
  • I doubt a huge database would be much of a problem, as the database is mostly just numbers. I can't rule it out though, especially the Enemies and Animations tabs.
  • I extremely doubt having a lot of variables or switches could cause a problem.
  • I think a really, really, really long event could indeed cause lag. It sounds like you don't have any such events though.

I suppose you could try creating a new (blank) project and seeing if you still have lag. Then, copy things over bit by bit and see if you can reproduce the lag again. But that would be a lot of work, and I'm not even sure it would be worth the effort.
It sounds like there's a bit of a confusion of terms here. The word "engine" refers to the runtime code that your game is based on,
Engine in software terminology refers to a part of the software system responsible for a specific task so it's rather vague.
Engine in software terminology refers to a part of the software system responsible for a specific task so it's rather vague.
"Engine" in video games pretty universally refers to the (prewritten) software that does the graphical rendering, runtime calculations, etc. When someone refers to "the Unreal engine" or "the Unity engine" they are never referring to developer environments for that.

And specifically on these forums, "engine" is always used to refer to the JavaScript code that runs the game, and "editor" is used to refer to the software one edits their project with. You must have seen this over the years you've been here.

Note that the OP is newer with a lower post count, I'm not criticizing them for misusing a word - but @Solar_Flare's correction is entirely correct and it's not vague to anyone who's familiar with this site 😛
I used the term simply to mean "part of the software". The editor itself is software.

While this is a truly fascinating tangent it doesn't help the OP identify their problem.
Might also be worth reading my thread here, which outlines a recent problem with windows 11: https://forums.rpgmakerweb.com/index.php?threads/4gb-patch-tool.180880/
It sounds like there's a bit of a confusion of terms here. The word "engine" refers to the runtime code that your game is based on, so to say you're having performance problems in the engine implies you're seeing issues when you run your game. But from what you've actually been saying, it sounds like your problems are actually in the editor, not the engine.

Here's some speculation about things that may or may not be able to cause lag:
  • I wouldn't expect the number of maps to cause lag in the editor. Nor would having a lot of "animated tiles" – the editor doesn't animate them, so that's basically irrelevant.
  • Having a really large map (999x999) could maybe cause some problems, or a map with a really large number of events (300 events?).
  • I don't think something in a map you're not even working on would cause problems, as long as you save regularly.
  • I doubt a huge database would be much of a problem, as the database is mostly just numbers. I can't rule it out though, especially the Enemies and Animations tabs.
  • I extremely doubt having a lot of variables or switches could cause a problem.
  • I think a really, really, really long event could indeed cause lag. It sounds like you don't have any such events though.

I suppose you could try creating a new (blank) project and seeing if you still have lag. Then, copy things over bit by bit and see if you can reproduce the lag again. But that would be a lot of work, and I'm not even sure it would be worth the effort.
My bad, I refer to the editor.
So it seems I found something? Completely unexpected. I noticed when previewing music in the editor, they suddenly stoped working, I had to restart the rpgmaker for it to work again. I thought there was too much music or too heavy, so I deleted all the music I wasn't using, including the default ones. Oddly, doing that also seemed to improve the lag and it stoped crashing. I haven't tested enough but I wonder if the heavy load of music had anything to do with it.

I don't have much time to test properly but if it stops crashing all around I'll let you all know, because deleting music files would be an odd fix.

Original thread: https://forums.rpgmakerweb.com/threads/experiencing-rpgmaker-mv-engine-lag-and-sttutering.181214/