when running my game from editor, it takes like 10 seconds and much faster once cached. But when I run from published link, It can take up to one minute and more to launch the game?
How many requests are you doing at once? This normally happens if you are doing hundreds or thousands at once as the browser can handle that many requests at once.
I believe launch tab is throttled (due to how we stored them on the servers) so that it can only do 4 or so requests at once (it’s not something we deliberately configured)
Published links are likely to allow as many requests as it’s given.
It’s taking longer generally because as an asset load fails, the engine retries to load in X ms which doubles on each failure.
200ms, then 400ms, etc until it hits the retry limit set in project settings which is why it takes a minute to ‘load’ or to ‘finish’ loading.
Without knowing more about you application or seeing the issue myself with the project, I can’t really pinpoint a potential issue. Can you share a published link to your application please?
I don’t get the network error but I can see that you are making 944 requests at once
Which is a lot and I can see why on some machines, this could lead to the issues you’ve mentioned.
In general, you need to reduce the number of network requests that you are requesting at once.
Some ways to help with that:
Use a in game loading screen(s) and load groups of assets at at time (eg groups of 200) and/or load them when needed for the next screen/part of the app. A bit more information here: Optimizing Load Time | Learn PlayCanvas
You can do both options too as I noticed it’s a 120MB download before the game really starts. I would advise on how to make the initial loading time as short as possible as the user generally leaves after 3-4 secs of loading
For example, all the WW_icon images are 128x128 in size. There’s 318 network requests and they would all fit on a single 4096 x 2048 texture saving 317 network requests.
Thank you! We simply used some dynamic loading and did some cleanup in the assets. It run fine now are are under 10 seconds loading when not cached, even less after.