playcanvas / engine

JavaScript game engine built on WebGL, WebGPU, WebXR and glTF
https://playcanvas.com
MIT License
9.56k stars 1.34k forks source link

Throttle large number of assets requests? #5258

Open yaustar opened 1 year ago

yaustar commented 1 year ago

Some browsers like chrome, will get network resource errors if there are too many network requests at once (usually around 1000 on my Macbook Pro). This will need to network errors and some assets not being loaded.

Projects that are commonly affected by this are those that preload many assets at once (eg https://www.warbands.io/)

Perhaps we should throttle the number (as a project option?) that are currently in flight to reduce possible errors on devices?

marklundin commented 1 month ago

Do you know what errors you get? Is the more related to hosting as opposed to the engine?

Maksims commented 1 month ago

Also bundles (once released publicly) - is great way to optimise number of network requests.