Running from published link much slower than playing from editor

Hello,

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?

Any reason that could explain the difference?

thanks for the support.

I do get a lot of those : Failed to load resource: net::ERR_INSUFFICIENT_RESOURCES

but not in editor mode.

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.

I don’t think we do anything special beside loading our game.

So we should handle ourself how playcanvas engine fetch the assets from the web?

Not too sure how to apply this.

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?

Ho! Thanks will do, is there a way to do so privately?

DM me

Done, just realised I do have those warning in editor mode as well.

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:

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

thank you for the insights, I will investigate into this.

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.

2 Likes

is 4k textures fine for mobile?

yep 4k is 99.9% of devices

2 Likes

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.

Thanks you

1 Like