Web game loads too slow on mobile devices(for 15 seconds), but on PC loads for 1-2 second. What to do?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Almetov_Ainur
:bust_in_silhouette: Reply From: Ertain

Web browser-based games are going to vary from how the browser is implemented on the platform. Mobile phones don’t have all of the capabilities of PCs, so there are going to be limitations. That being written, I would recommend using the debugging tools of the Godot engine to find the bottlenecks. I would also use the debugging tools of your mobile platform of choice to possibly find other bottlenecks. You can even use the debugging tools of your browser of choice to run certain scenarios for your game (e.g. use different hardware profiles to see how it runs and where the game is using too much of the CPU). Here’s some information on the debugger tools for Chrome and Firefox.

:bust_in_silhouette: Reply From: Calinou

See also this GitHub issue: Godot HTML5 games have a really long time to first interaction · Issue #41118 · godotengine/godot · GitHub

Make sure to use a host that supports transparent gzip/Brotli compression to make the initIal download significantly faster. itch.io most notably does not support transparent compression, but hosts like GitHub Pages do.