RMMV Finding an infinite loop / parallell process?

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
278
Reaction score
161
First Language
Swedish
Primarily Uses
N/A
Hello!

So I do not think that I have an infinite loop running or anything. But I have occassionally experienced lag...
So is there any way to see inifinte loops in the console using breakpoints or similar. And the case here would be that I would not be able to find the loop in the code.

And in terms of parallell processes the question is essentially the same. I was thinking of adding a console log after the interpreter. But I don't want to do that continuously, some of them are needed tbh. So I would probably make an if statement that checks a self var and ensures that if the self var is less than maxAllowedLooping it doesn't log. As the act of logging actually takes quite a bit of cream from the engine.

But perhaps there is a better way?

Best regards,
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
3,037
Reaction score
2,313
First Language
English
Primarily Uses
RMMV
Just put a sound effect or something in the event you suspect is looping and you find out fast enough.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
35,810
Reaction score
9,468
First Language
German
Primarily Uses
RMMV
not really - and always remember that there can be a different cause for the lag.

easiest to find are parallel processes in common events as that will only require a check on the database.
on the other hand, common event parallels are the only ones that can cover multiple maps - in all other cases the parallel process has to be on the map where it causes lag, and that reduces the number of events to check quite a bit.
 

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
278
Reaction score
161
First Language
Swedish
Primarily Uses
N/A
not really - and always remember that there can be a different cause for the lag.

easiest to find are parallel processes in common events as that will only require a check on the database.
on the other hand, common event parallels are the only ones that can cover multiple maps - in all other cases the parallel process has to be on the map where it causes lag, and that reduces the number of events to check quite a bit.
Yeah certainly, many, many reasons for lag. But was hopeful that there would be an easy way to just check if there is a loop somewhere. But this would still be highly unlikely, every time I use a loop there's a reason for the loop, so if it causes infinity it would be a noticeable amount of lag.

The question came up because I had issues the other day where the node would hit 50-60% load in process after maybe 10-15 minutes and I thought that perhaps there's a buildup of some loop. The compared value would be between 5-10 % with a 4 Ghz processor under normal circumstances.

Yeah, I imagined there would be an easy way to check the parallell processing. So, if I ever feel it is lagging I'll just go through the events on the gamemap and then the database for common events. Thanks! :)

Just put a sound effect or something in the event you suspect is looping and you find out fast enough.
300 maps, 10-50 events per map :p Excluding another 300-400 common events. Excluding the dangers of javascript loops. And I do not believe there are any loops, but I was thinking if there is an easy way to check for it, then I could just see if there's a leak somewhere, which I honestly don't think there is.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
35,810
Reaction score
9,468
First Language
German
Primarily Uses
RMMV
The question came up because I had issues the other day where the node would hit 50-60% load in process after maybe 10-15 minutes and I thought that perhaps there's a buildup of some loop.
no, a loop would be a constant drag - this sounds more like a memory leak or a bad/failed iteration process from a plugin.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
5,411
Reaction score
2,132
First Language
Dutch
Primarily Uses
RMMV
I remember Ocram have a plugin that can run many parallels events,
but only change the event or value from it if it changes, otherwise,
it doesn't loop as parallel if the value remain the same.

there might be something that you can use, but you can ask for
permission if you need some of the code? or use that plugin
to stop looping? if value is the same?
 

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
278
Reaction score
161
First Language
Swedish
Primarily Uses
N/A
no, a loop would be a constant drag - this sounds more like a memory leak or a bad/failed iteration process from a plugin.
I think it probably happend since I was continously changing window functions and such. But I guess it will show soon if it will happen again.

I remember Ocram have a plugin that can run many parallels events,
but only change the event or value from it if it changes, otherwise,
it doesn't loop as parallel if the value remain the same.

there might be something that you can use, but you can ask for
permission if you need some of the code? or use that plugin
to stop looping? if value is the same?
Thanks, I shall look into that :)
 

Latest Threads

Latest Profile Posts

Beep-Beep-Motha-facka.gif

Just finished and uploaded the delivery truck base/sprite sheet. I've been steadily replacing the default assets with early modern alternatives. The air-ship for a biplane, horse-drawn wagon for a delivery truck, and next a sailboat for a steam-powered passenger liner (think of the SS Olympic and RMS Titanic).
I caught a shiny magikarp on pokemonGO today AND finally saw Detective Pikachu and it was so cute and I'm still so hype AHHHHH!!!
one of the coolest things I've learned from the forums is the ability to give yourself a hitbox. I have a move you can do on the fields. shoulder tackle. thanks to the forums, that tackle triggers self A switches on some events. NPC's and the environment now react to the tackle. awesome.
I really liked how this one turned out! :kaopride:
WYqMPf6.png

Character (Yes, this is a character): Nibiru the Primal Being from Yugioh.
Dragon Quest style enemy selection plugin work in progress:

Quest_Targeting.png

It's a simple targeting system from the NES era. Select an enemy group; single-target skills will target the first enemy in that group.

Quest-Targeting-Animated.gif

Forum statistics

Threads
121,936
Messages
1,145,288
Members
160,207
Latest member
RiceKun
Top