RMMV Finding an infinite loop / parallell process?

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
261
Reaction score
155
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,014
Reaction score
2,275
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,760
Reaction score
8,969
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
261
Reaction score
155
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,760
Reaction score
8,969
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,858
Reaction score
1,868
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
261
Reaction score
155
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 Posts

Latest Profile Posts

ZyCHqk2.png

Something about top-downs.
I have never felt so attacked by a tree before :LZSlol: it took 10++ hours to make but at least it looks pretty LOL

Untitled-1.png
now seems like the worst time for me to need a better computer with how much stuff is costing. that and I don't thing there's much else I can do to make MV run any better with what I have.
Sigh... to have some variety in this weather. More than just sun and rain and wind and thunder.
In the meantime, I've discovered that I'm slowly becoming fatigued from the many sleepless nights my neighbors cause. Or at least their dogs. Always barking at something.
I might need a day to just sleep and recharge.

Forum statistics

Threads
118,452
Messages
1,116,087
Members
155,430
Latest member
rozc
Top