fojamF
Normal2y ago
8 replies
fojam

Best way to support async room loading?

Lately we've been working on a feature to support faster loading of normcore rooms, so that we can split larger areas over multiple rooms and load/unload them as needed. I made an object pool to reduce Instantiations on the initial room load, and we preload the pool with the total number of RealtimeView instances in the room (we keep track of these on the "host" client). However, even doing this, there's a significant bit of lag when loading in the room (about 845ms with 6 players, testing with roughly 1800 RealtimeModels in the room. This is the higher end of the possible object count though. 240 objects would be more typical for 6 players). We have a lot of small networked objects in the room per player, so it's difficult to improve this by reducing realtime model instances, since they all have properties that need to be networked individually.

What we've tried:
- preload pooled object instances
- pre-activate the pooled objects and move them off-screen
- override CreateModel and "preload" the model (found out this needs to be done on the prefab and not the instance)
- reduce time in OnRealtimeModelReplaced calls (still working on this)

Are there any other ways we could go about reducing this?
Was this page helpful?