RMMV Finding an infinite loop / parallell process?

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
274
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,017
Reaction score
2,277
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
34,763
Reaction score
8,971
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
274
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
34,763
Reaction score
8,971
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
4,873
Reaction score
1,872
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
274
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

ScreenShot_1_3_2022_1_32_12.png
I feel QSprite for MV is underrated. I basically am able to use my chibi sideview battlers I drew on the maps and have all the motions available. this'll help a lot with cutscenes.
I've figured out how to reasonably tall-ify chibi sprites on my editor. I like that making tall sprites gives me control on expressing how tall characters seem on the field relative to each other as well as better differentiate adult sprites from child sprites.
doing some wacky experimental stuff in MV right now :kaoluv: I cannot wait to drop what I've been working on
Doing RPG Maker News for this week. (January 14th - 20th, 2022)

My brother keeps saying," Women in his story act crazy because women are crazy." That's one way to make sure that the only woman in his life will be the retirement caregiver nurse that has to change his bedpan.

Forum statistics

Threads
118,552
Messages
1,116,916
Members
155,592
Latest member
Demure_Hero
Top