StreamingEnabled having extremely long loading times for the game & vehicle spawning

Hey everyone,

After attempting to use StreamingEnabled for my flight simulator, we noticed that loading times (waiting for PersistentLoaded) are incredibly long - also this is increased by the amount of players that have joined the game.

Furthermore, when loading in aircraft from ServerStorage, in order for our aircraft system to function we have to repeat wait until the aircraft is loaded, but this simply takes a ridiculous amount of time with StreamingEnabled and 10+ players in the server, sometimes 2/3 minutes+.

With our own chunk loader (spawning airports in and out of ReplicatedStorage), aircraft load almost instantly with the exact same conditions. However, this uses more memory, is worse on framerates etc etc.

local Response, Aircraft = ReplicatedStorage.RemoteFunctions.Misc.CheckPlayer:InvokeServer(
				Mechanics.Values.SelectedAircraft.Value, 
				Mechanics.Values.SelectedLivery.Value,
				Mechanics.Values.SelectedColour.Value,
				Mechanics.Values.SelectedAirport.Value,
				Mechanics.Values.SelectedGate.Value
			)
			
			print("SpawnerServer Response", Response)
			
			repeat task.wait() until Response
			
			print(Response, "Aquired", Aircraft)
			
			repeat task.wait() until Aircraft:FindFirstChild("PilotSeat", true)
			
			task.wait(5)

Above is the loading process for aircraft spawning (locally)

If anyone has any advice, we would greatly appreciate it.

2 Likes

Just saw this I have not tried it but here’s the link Xenon Streaming Engine - an alternative to StreamingEnabled

1 Like

What is the streaming mode of the aircraft model? And what are your streaming settings under workspace?

It’s usually better to use waitforchild on parts that actually need it instead of waiting for the entire model to load.

Perhaps there’s some parts of the model that are very far away, causing them to not get loaded in correctly.

1 Like

Aircraft ModelStreamingMode = default

Workspace streaming settings:

  • Default integrity mode
  • Min Radius 12000
  • Max Radius 30000 (large map needs to be rendered from high altitudes)
  • StreamOutBehaviour LowMemory

With regards to waiting for a specific part, we’re already waiting for just the PilotSeat to load.

And the Aircraft is positioned before it is parented, so the distance from the player shouldn’t be the issue.

1 Like

One thing that stands out to me is the (extremely) high minRadius. I think that could cause issues on lower performance devices.

In your OP, you mentioned you’re waiting for PersistentLoaded. Did you adjust this?
If not, then you’ll be waiting for the entire model, and not just the seat.

Can you show the code snippet that waits for the plane?

1 Like

replying for him lol, I am also a developer for his game, the code snippet which he provided is what waits for the aircraft to load in, We can reduce the minimum streaming radius however this isn’t good on our end as islands will spawn in at a very short distance and is more inconvenient

1 Like

Ok.
I don’t see why the first repeat wait is needed.

Can you move the print so you can see which call takes the most amount of time?
Is it the InvokeServer function call, or the ‘PilotSeat’ WaitForChild?

1 Like

Repeat wait is needed as the aircraft does not load in instantly, usually for me it take 10-32 seconds to load in

Pilot Seat repeat takes the longest, I have other prints further down the code which you won’t be able to see

The remote function, does it instantly return, and load the airplane on another thread?

Is the plane loaded on the server fast enough?

Remote turns instantly minimal yielding, the server loads it completely fine and is fast, the client takes longer hence why we made this forum

You’re sure the server actually loads the seat in the expected time. Did you try waiting for the seat on the server?

I have checked, it is fast, I’ve done a 1 player test with the client and server feature and checked how fast both of them loaded in

Ok, if you’re thinking it’s a streaming issue, it might be helpful to remove many parts of the model.

Reducing the complexity can help you figure out issues on your side. If reducing model complexity magically solves it, then it’s an internal bug with streaming (unlikely).

I’ve just tried it and it does basically solve it, more of an internal bug with streaming ig

1 Like

Ok, might also just be due to the size of the model. I assume there’s no way to reduce it’s size?

You could try first loading in critical parts, that the client needs to wait for. And only after those are loaded, load in the details of the plane.

Might require more work on your end though.