Testing multiple scenes / closing them, leads to slowdown

I have a map where I can go to different levels and then return to it, and I was pretty careful to make sure that previous scenes were closed.

But when I open a level for the third time (i.e., I open a scene, return to the map, open a scene, return to the map, then open a scene again), the performance is severely stunted, unplayable. It’s not a specific level causing this issue, but just the third time a scene is opened.

Am I missing a “stop any paused scenes?” Cause I’ve been quite careful about clearing the memory between scene switches. I’ve double checked it a ton, and it is stopping all paused scenes.


Do you change scenes or pause scenes?
Can you try to reproduce the issue in a new project, and share it with us if you succeed?

Okay, I’ll keep exploring what the deal is. I’ll let you know if I discover what the problem is.

I think it may have to do with a ton of storage being read? I made sure to close all of the storage but this doesn’t seem to help. Maybe I’m missing something?

I also ran a debug a few times, and it looks like the time per events is multiplied each time a scene is opened. I have no idea why. It looks like it’s reading linked events per level multiple times.

What do you call linked events?
I remember a problem with external layouts loading the objects twice, but it doesn’t sound quite like your issue.
Can you share a liluo build, so I can take a look at the issue?

Oh, “Include Events from ‘LevelStart’”.

I use a ton of these, 15-20 of them per level (it’s a big project).

For example. I thought maybe about using a trigger once but that obviously wouldn’t work. I have no idea what’s causing it. I did a retest and it’s just finishing a level and going to a consecutive one, from the map, that causes a slowdown of 100% (adding ~100% more load per every additional level opened). It’s almost as if it’s not actually closing the previous scene at all, but I made super sure that it was.

It’s very weird. I’d share it but I’m super secretive about the project I’m sorry haha. O_o

Most of us don’t care about about your project per se, but just want to help you to get it working. You can share a project in a PM rather than on this public post. Check with whoever you PM if you do, but I suspect any of the devs will be fine with it.

If you think you found a sure way to reproduce the issue, try to reproduce it in a dummy project, and share that if you’re successful.

I will keep you guys updated, I’m pretty much stuck until I figure this out so gonna focus on this in the timebeing.

There’s somewhat of a related thread here

My guess is it’s probably a memory leak.

Another thing of note here is that when I restart a level directly from inside the game, there are no issues. Going back to the map, and going to the same level, has no problems no matter how many times I do it.

Only when I go to a new or distinct level, I’m getting massive slowdown. Still working on what’s causing it.

From the editor, or within the game?

Within the game. I’m now gonna just delete my external links one by one and see which one may be causing this issue. It’s really weird.

It’s a fairly common condition. :thinking:
Could you make a dummy project demonstrating the issue?

Edit: not even sure if that’s the problem.

Solved it. Rolled back to 5.0.130

Other people noticed the problem and rolled back and gave me the idea to do this.

Just a heads up.