Slowdown

So, I was testing a couple maps for about 20~30 minutes. Most maps are fine for the duration of the playtest,
but over time I noticed that there is one map that progressively gets more laggy until it becomes unplayable.

The only thing I can reason that causes the lag is that, this particular map tests a lot "puzzle" mechanics but there are not too many parallel events and when I check console there aren't any errors.

I am using 1.5.1.

Could we discuss what are the possible reasons that the game starts to lag (specifically on that map). So I can try to avoid making future maps that could cause the game breaking performance dip.
Which plugins do you use?
Even one parallel event can cause severe lag if it's not written well.

If it's a gradual thing, where it starts off fine then gets slower and slower, I'm thinking it might be some resource thing. Are you loading images, sprites, etc?

What kind of "puzzle" mechanics do you have?

If it's only one map and not consistent on that map, I'm suspecting it might not be plugins.
Heh.

The map was meant to test functionality among different plugins so in the future I have no intention of cramming all them in the same space.

But as follows:
YEP_SmartJump
YEP_SlipperyTiles
Mr.Trivel's Quicksand
Mog_Pick&Throw
GALV's Projectiles

-----------------------------------

If it's a resource thing that could be slowing down the system: the following things are also put into map (to consolidate testing)

MOG_ShatterEffect (Not Parallel, Action Button)
MOG_CharParticles (Which could be a potential culprit, but I have at most 5 instances)
MOG_SplashEffect
Sensor Switches

The only other things I can think of are regions being declared.
YEP_SlipperyTiles uses a set.
Mr.Trivel's Quicksand uses another set.
Then I have 2 region restrictions for player and events.
----------------------------------

I also have PH_Reflections turned on (and YEP_AnimatedTiles turned on) -- I will check if those affect performance at some point, since I forgot those also eat up resources. (It's also my "biggest" test map being 26x21 tiles.)

----------------------------------

The last thing I noticed is when I use TPPD_Preloader, the map loads rather quickly -- but when the Preloader is turned off, there is a huge spike when entering the map. And actually takes a notable time to stabilize.

---------------------------------

Ah, also the parallel events on the map all just "Conditional Branches" that check if a "Time" switch turned on or off so it can properly set the correct Tone. And to turn off the global "Time" switch from the "World Test" map so that "Time" doesn't keep ticking while in that map.

Those are so far, the only things I've noticed, since I'm focusing on a different thing again. huehuehue...
Make your parallel process events wait for 5 frames or so - that sort of thing can certainly cause lag if you're not letting them come up for air, and letting others get a look-in.

I don't know what some of those plugins are, but I'd certainly consider the particle plugin, reflection and animated tiles plugins and potential culprits. Especially the particle plugin, as that could easily be creating new bitmaps continually and not cleaning them up well afterwards. When you first posted I was thinking "what kind of plugin would continue creating new objects for the entire time you're on the map?" - a particle effect plugin would.

Original thread: https://forums.rpgmakerweb.com/threads/slowdown.92688/