# Running from published link much slower than playing from editor

**URL:** <https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900>\
**Category:** Help & Support\
**Created:** [October 12, 2022, 9:15pm UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900 "2022-10-12T21:15:32Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![memleak](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/memleak/32/9973_2.png) [@memleak](https://forum.playcanvas.com/u/memleak)\
**Post date:** [October 12, 2022, 9:15pm UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/1 "2022-10-12T21:15:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![memleak](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/memleak/32/9973_2.png) [@memleak](https://forum.playcanvas.com/u/memleak)\
**Post date:** [October 12, 2022, 9:16pm UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/2 "2022-10-12T21:16:43Z")

</div>

I do get a lot of those : Failed to load resource: net::ERR\_INSUFFICIENT\_RESOURCES

but not in editor mode.

---

<div class="post-metadata">

**Author:** ![yaustar](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/yaustar/32/2268_2.png) [@yaustar](https://forum.playcanvas.com/u/yaustar)\
**Post date:** [October 13, 2022, 11:07am UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/3 "2022-10-13T11:07:48Z")

</div>

> [@memleak](#):
>
> Failed to load resource: net::ERR\_INSUFFICIENT\_RESOURCES

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.

---

<div class="post-metadata">

**Author:** ![memleak](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/memleak/32/9973_2.png) [@memleak](https://forum.playcanvas.com/u/memleak)\
**Post date:** [October 13, 2022, 11:29am UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/4 "2022-10-13T11:29:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![yaustar](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/yaustar/32/2268_2.png) [@yaustar](https://forum.playcanvas.com/u/yaustar)\
**Post date:** [October 13, 2022, 11:39am UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/5 "2022-10-13T11:39:43Z")

</div>

> [@memleak](#):
>
> So we should handle ourself how playcanvas engine fetch the assets from the web?

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?

---

<div class="post-metadata">

**Author:** ![memleak](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/memleak/32/9973_2.png) [@memleak](https://forum.playcanvas.com/u/memleak)\
**Post date:** [October 13, 2022, 11:41am UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/6 "2022-10-13T11:41:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yaustar](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/yaustar/32/2268_2.png) [@yaustar](https://forum.playcanvas.com/u/yaustar)\
**Post date:** [October 13, 2022, 11:47am UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/7 "2022-10-13T11:47:11Z")

</div>

DM me

---

<div class="post-metadata">

**Author:** ![memleak](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/memleak/32/9973_2.png) [@memleak](https://forum.playcanvas.com/u/memleak)\
**Post date:** [October 13, 2022, 12:08pm UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/8 "2022-10-13T12:08:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yaustar](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/yaustar/32/2268_2.png) [@yaustar](https://forum.playcanvas.com/u/yaustar)\
**Post date:** [October 13, 2022, 12:48pm UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/9 "2022-10-13T12:48:00Z")

</div>

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](https://developer.playcanvas.com/en/user-manual/optimization/load-time/)

- As some of the textures are small/part of the UI/sprites, pack them into multiple texture 4K atlases so instead of loading 20 individual icons, it’s one atlas with 20 sprites/frames (see [https://twitter.com/yaustar/status/1359518743265742850](https://twitter.com/yaustar/status/1359518743265742850)). [TexturePacker - Create Sprite Sheets for your game!](https://www.codeandweb.com/texturepacker) has a PlayCanvas export option.

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

---

<div class="post-metadata">

**Author:** ![memleak](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/memleak/32/9973_2.png) [@memleak](https://forum.playcanvas.com/u/memleak)\
**Post date:** [October 13, 2022, 12:50pm UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/10 "2022-10-13T12:50:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yaustar](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/yaustar/32/2268_2.png) [@yaustar](https://forum.playcanvas.com/u/yaustar)\
**Post date:** [October 13, 2022, 12:59pm UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/11 "2022-10-13T12:59:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![memleak](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/memleak/32/9973_2.png) [@memleak](https://forum.playcanvas.com/u/memleak)\
**Post date:** [October 13, 2022, 1:11pm UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/12 "2022-10-13T13:11:51Z")

</div>

is 4k textures fine for mobile?

---

<div class="post-metadata">

**Author:** ![mvaligursky](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/mvaligursky/32/11681_2.png) [@mvaligursky](https://forum.playcanvas.com/u/mvaligursky)\
**Post date:** [October 13, 2022, 2:03pm UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/13 "2022-10-13T14:03:32Z")

</div>

yep 4k is 99.9% of devices

---

<div class="post-metadata">

**Author:** ![memleak](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/memleak/32/9973_2.png) [@memleak](https://forum.playcanvas.com/u/memleak)\
**Post date:** [October 13, 2022, 11:46pm UTC](https://forum.playcanvas.com/t/running-from-published-link-much-slower-than-playing-from-editor/27900/14 "2022-10-13T23:46:45Z")

</div>

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
