Is there a way to optimize Loading.PersistentManager?

My team is hard at work creating an adventure game set in a large, 3 square-mile open environment.

Using Unity 5, we split around 40 big terrains into 10K smaller, more “streamable” chunks.

It works quite well, with terrain instatiation not taking too long, around 1 ms to be precise. The problem is that one Unity function is taking A LOT of CPU time, around 50 ms on my Intel i5. The function is called Loading.PersistentManager and I really don’t know what it does.

I have read two threads on the matter, but no one seems to know anything about it and how to reduce its impact on the machine.

Any loading/streaming guru out there who could help?

For what it’s worth, LoadAsync(“”) tells Unity to load EVERYTHING in the Resources folder. That is a pretty expensive operation.

I just had this problem too, and it was because we were doing Resources.LoadAsync() on an empty or null string (it might also happen if the resource doesn’t exist). I was seeing the same thing with Loading.LockPersistentManager, but in my case it was taking 3000+ ms!

I fixed the bad Resources.LoadAsync() call and now it’s working normally again.