Optimisation loading time

Hello , please I am working locally and i have a lost time when I load my scene , I tested with Chrome and Firefox, it gives me the same thing , any ideas ?

Thanks !

1 Like

Hi, what is the p.obj?

When optimizing, I frequently do comparisons. So for this I would remove p.obj and compare to see if the delay is still there.

Also there are a few surprising things with this in addition. 1st the index file being loaded so late. That would be the 1st thing I’d try to change. Probably moving the scripts loading to the bottom is good if you haven’t already. Also, sometimes loading images and especially audio on a delay can actually be good. So if you have lazy-loading logic maybe that is at play. The concurrency also looks good.

In devtools, it is possible to determine such things… keep digging. Eventually you can find the line of code that is the last before the delay. That is usually where the optimization becomes clear. Also… it might be network related? So if you can try local tests to isolate that it is helpful.

Oh and worth mentioning the greatest optimization my team always finds… is with GZIP(on the server). Huge savings relatively. That might have some effect here.

Overall, looking for ways to load p.obj differently will probably help. :slight_smile:

Thanks for response ,
The index.html it is loaded first , i sorted the list by size.
I cant remove p.obj because it is my 3D object .
The currios thing is that i am working localy , and after p.obj was loading ,nothing happend , afer 10 second , the reload load the rest of the files.
Maybe can i incrass the local speed loading of Chrome ?

Oh I see now… interesting.

I realize you cannot remove p.obj. The suggestion was to look at the performance difference when you remove it as a TEST. That way you can isolate that the delay is caused by that obj or something else. :slight_smile: And overall GZIP will probably give you the best optimization when you get to production.

Also, if it were me… I’d drop some breakpoints around babylon.js#2731 to watch it in action (after isolating p.obj needs optimization). Reading source code is a great way to learn what is going on. It almost always has surprises. And those surprises usually contain an answer… I hadn’t thought to look for!

Are you using the AssetManager? It is pretty good. : )

Also can you try to repro on the playground? We could help better if we could see the real code